neuro-simulator 0.5.4__py3-none-any.whl → 0.6.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- neuro_simulator/agent/llm.py +23 -19
- neuro_simulator/chatbot/core.py +10 -10
- neuro_simulator/chatbot/llm.py +22 -19
- neuro_simulator/chatbot/nickname_gen/generator.py +3 -3
- neuro_simulator/chatbot/tools/manager.py +10 -8
- neuro_simulator/cli.py +7 -12
- neuro_simulator/client/assets/index-C_kzLmQy.css +1 -0
- neuro_simulator/client/assets/index-DRLWJPZv.js +7 -0
- neuro_simulator/client/assets/inter-cyrillic-400-normal-BLGc9T1a.woff2 +0 -0
- neuro_simulator/client/assets/inter-cyrillic-400-normal-alAqRL36.woff +0 -0
- neuro_simulator/client/assets/inter-cyrillic-ext-400-normal-BE2fNs0E.woff +0 -0
- neuro_simulator/client/assets/inter-cyrillic-ext-400-normal-Dc4VJyIJ.woff2 +0 -0
- neuro_simulator/client/assets/inter-greek-400-normal-C3I71FoW.woff +0 -0
- neuro_simulator/client/assets/inter-greek-400-normal-DxZsaF_h.woff2 +0 -0
- neuro_simulator/client/assets/inter-greek-ext-400-normal-Bput3-QP.woff2 +0 -0
- neuro_simulator/client/assets/inter-greek-ext-400-normal-XIH6-K3k.woff +0 -0
- neuro_simulator/client/assets/inter-latin-400-normal-C38fXH4l.woff2 +0 -0
- neuro_simulator/client/assets/inter-latin-400-normal-CyCys3Eg.woff +0 -0
- neuro_simulator/client/assets/inter-latin-ext-400-normal-77YHD8bZ.woff +0 -0
- neuro_simulator/client/assets/inter-latin-ext-400-normal-C1nco2VV.woff2 +0 -0
- neuro_simulator/client/assets/inter-vietnamese-400-normal-Bbgyi5SW.woff +0 -0
- neuro_simulator/client/assets/inter-vietnamese-400-normal-DMkecbls.woff2 +0 -0
- neuro_simulator/client/avatar.webp +0 -0
- neuro_simulator/client/background.webp +0 -0
- neuro_simulator/client/background_old.webp +0 -0
- neuro_simulator/client/banner.jpeg +0 -0
- neuro_simulator/client/channel_points.png +0 -0
- neuro_simulator/client/error.mp3 +0 -0
- neuro_simulator/client/favicon.ico +0 -0
- neuro_simulator/client/fonts/causten.woff2 +0 -0
- neuro_simulator/client/fonts/comic.woff2 +0 -0
- neuro_simulator/client/fonts/first-coffee.woff2 +0 -0
- neuro_simulator/client/fonts/noto-sans-sc.woff2 +0 -0
- neuro_simulator/client/index.html +306 -0
- neuro_simulator/client/neuro_start.mp4 +0 -0
- neuro_simulator/client/neurosama.png +0 -0
- neuro_simulator/client/sc_pink.png +0 -0
- neuro_simulator/client/sc_purple.png +0 -0
- neuro_simulator/client/sub_badge.svg +4 -0
- neuro_simulator/client/user_avatar.jpg +0 -0
- neuro_simulator/core/agent_factory.py +9 -18
- neuro_simulator/core/application.py +86 -56
- neuro_simulator/core/config.py +88 -301
- neuro_simulator/core/path_manager.py +7 -7
- neuro_simulator/dashboard/assets/{AgentView-C6qW7TIe.js → AgentView-DBq2msN_.js} +2 -2
- neuro_simulator/dashboard/assets/{ChatBotView-BRYIM_8s.js → ChatBotView-BqQsuJUv.js} +2 -2
- neuro_simulator/dashboard/assets/ConfigView-CPYMgl_d.js +2 -0
- neuro_simulator/dashboard/assets/ConfigView-aFribfyR.css +1 -0
- neuro_simulator/dashboard/assets/{ContextTab-GRHICOS3.js → ContextTab-BSROkcd2.js} +1 -1
- neuro_simulator/dashboard/assets/{ControlView-D5vPB_OE.js → ControlView-BvflkxO-.js} +1 -1
- neuro_simulator/dashboard/assets/FieldRenderer-DyPAEyOT.js +1 -0
- neuro_simulator/dashboard/assets/LogsTab-C-SZhHdN.js +1 -0
- neuro_simulator/dashboard/assets/LogsView-82wOs2Pp.js +1 -0
- neuro_simulator/dashboard/assets/{MemoryTab-BSUWFbcV.js → MemoryTab-p3Q-Wa4e.js} +3 -3
- neuro_simulator/dashboard/assets/{ToolsTab-Bjcm3fFL.js → ToolsTab-BxbFZhXs.js} +1 -1
- neuro_simulator/dashboard/assets/index-Ba5ZG3QB.js +52 -0
- neuro_simulator/dashboard/assets/{index-C7dox9UB.css → index-CcYt9OR6.css} +1 -1
- neuro_simulator/dashboard/index.html +2 -2
- neuro_simulator/services/audio.py +55 -47
- neuro_simulator/services/builtin.py +3 -0
- neuro_simulator/services/stream.py +1 -1
- neuro_simulator/utils/queue.py +2 -2
- {neuro_simulator-0.5.4.dist-info → neuro_simulator-0.6.1.dist-info}/METADATA +1 -2
- {neuro_simulator-0.5.4.dist-info → neuro_simulator-0.6.1.dist-info}/RECORD +68 -35
- requirements.txt +1 -1
- neuro_simulator/config.yaml.example +0 -117
- neuro_simulator/dashboard/assets/ConfigView-Cw-VPFzt.js +0 -2
- neuro_simulator/dashboard/assets/FieldRenderer-DaTYxmtO.js +0 -1
- neuro_simulator/dashboard/assets/LogsTab-CATao-mZ.js +0 -1
- neuro_simulator/dashboard/assets/LogsView-BM419A5R.js +0 -1
- neuro_simulator/dashboard/assets/index-BiAhe8fO.js +0 -34
- neuro_simulator/services/letta.py +0 -254
- {neuro_simulator-0.5.4.dist-info → neuro_simulator-0.6.1.dist-info}/WHEEL +0 -0
- {neuro_simulator-0.5.4.dist-info → neuro_simulator-0.6.1.dist-info}/entry_points.txt +0 -0
- {neuro_simulator-0.5.4.dist-info → neuro_simulator-0.6.1.dist-info}/licenses/LICENSE +0 -0
@@ -5,8 +5,8 @@
|
|
5
5
|
<link rel="icon" href="/favicon.ico">
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7
7
|
<title>𝐯𝐞𝐝𝐚𝐥𝟗𝟖𝟕 𝐒𝐢𝐦𝐮𝐥𝐚𝐭𝐨𝐫</title>
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
8
|
+
<script type="module" crossorigin src="/assets/index-Ba5ZG3QB.js"></script>
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CcYt9OR6.css">
|
10
10
|
</head>
|
11
11
|
<body>
|
12
12
|
<div id="app"></div>
|
@@ -34,65 +34,73 @@ def _remove_emoji(text: str) -> str:
|
|
34
34
|
)
|
35
35
|
return emoji_pattern.sub(r'', text).strip()
|
36
36
|
|
37
|
-
async def synthesize_audio_segment(text: str,
|
37
|
+
async def synthesize_audio_segment(text: str, tts_provider_id: str) -> tuple[str, float]:
|
38
38
|
"""
|
39
|
-
Synthesizes audio using
|
39
|
+
Synthesizes audio using a configured TTS provider.
|
40
40
|
Returns a Base64 encoded audio string and the audio duration in seconds.
|
41
41
|
"""
|
42
42
|
# Clean emojis from the text before synthesis
|
43
43
|
text = _remove_emoji(text)
|
44
44
|
if not text:
|
45
|
-
# If text is empty after cleaning, no need to synthesize.
|
46
45
|
return "", 0.0
|
47
46
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
if not azure_key or not azure_region:
|
52
|
-
raise ValueError("Azure Speech Key or Region is not set in the configuration.")
|
47
|
+
# Find the specified TTS provider in the configuration
|
48
|
+
provider_config = next((p for p in config_manager.settings.tts_providers if p.provider_id == tts_provider_id), None)
|
53
49
|
|
54
|
-
|
55
|
-
|
50
|
+
if not provider_config:
|
51
|
+
raise ValueError(f"TTS Provider with ID '{tts_provider_id}' not found in configuration.")
|
56
52
|
|
57
|
-
|
58
|
-
|
53
|
+
# --- Dispatch based on provider type ---
|
54
|
+
# Currently, only Azure is supported.
|
55
|
+
if provider_config.provider_type == 'azure':
|
56
|
+
if not provider_config.api_key or not provider_config.region:
|
57
|
+
raise ValueError(f"Azure TTS provider '{provider_config.display_name}' is missing API key or region.")
|
59
58
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
escaped_text = html.escape(text)
|
59
|
+
# Hardcoded voice and pitch as per design
|
60
|
+
voice_name = "en-US-AshleyNeural"
|
61
|
+
pitch = 1.25
|
64
62
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
63
|
+
speech_config = speechsdk.SpeechConfig(subscription=provider_config.api_key, region=provider_config.region)
|
64
|
+
speech_config.set_speech_synthesis_output_format(speechsdk.SpeechSynthesisOutputFormat.Audio16Khz32KBitRateMonoMp3)
|
65
|
+
|
66
|
+
pitch_percent = int((pitch - 1.0) * 100)
|
67
|
+
pitch_ssml_value = f"+{pitch_percent}%" if pitch_percent >= 0 else f"{pitch_percent}%"
|
68
|
+
|
69
|
+
escaped_text = html.escape(text)
|
70
|
+
|
71
|
+
ssml_string = f"""
|
72
|
+
<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-US">
|
73
|
+
<voice name="{voice_name}">
|
74
|
+
<prosody pitch="{pitch_ssml_value}">
|
75
|
+
{escaped_text}
|
76
|
+
</prosody>
|
77
|
+
</voice>
|
78
|
+
</speak>
|
79
|
+
"""
|
80
|
+
|
81
|
+
synthesizer = speechsdk.SpeechSynthesizer(speech_config=speech_config, audio_config=None)
|
76
82
|
|
77
|
-
|
78
|
-
|
83
|
+
def _perform_synthesis_sync():
|
84
|
+
return synthesizer.speak_ssml_async(ssml_string).get()
|
79
85
|
|
80
|
-
|
81
|
-
|
86
|
+
try:
|
87
|
+
result = await asyncio.to_thread(_perform_synthesis_sync)
|
82
88
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
89
|
+
if result.reason == speechsdk.ResultReason.SynthesizingAudioCompleted:
|
90
|
+
audio_data = result.audio_data
|
91
|
+
encoded_audio = base64.b64encode(audio_data).decode('utf-8')
|
92
|
+
audio_duration_sec = result.audio_duration.total_seconds()
|
93
|
+
logger.info(f"TTS synthesis completed: '{text[:30]}...' (Duration: {audio_duration_sec:.2f}s)")
|
94
|
+
return encoded_audio, audio_duration_sec
|
95
|
+
else:
|
96
|
+
cancellation_details = result.cancellation_details
|
97
|
+
error_message = f"TTS synthesis failed (Reason: {cancellation_details.reason}). Text: '{text}'"
|
98
|
+
if cancellation_details.error_details:
|
99
|
+
error_message += f" | Details: {cancellation_details.error_details}"
|
100
|
+
logger.error(error_message)
|
101
|
+
raise Exception(error_message)
|
102
|
+
except Exception as e:
|
103
|
+
logger.error(f"An exception occurred during the Azure TTS SDK call: {e}", exc_info=True)
|
104
|
+
raise
|
105
|
+
else:
|
106
|
+
raise NotImplementedError(f"TTS provider type '{provider_config.provider_type}' is not supported.")
|
@@ -113,5 +113,8 @@ class BuiltinAgentWrapper(BaseAgent):
|
|
113
113
|
return result
|
114
114
|
|
115
115
|
# Context/Message History
|
116
|
+
async def build_neuro_prompt(self, messages: List[Dict[str, str]]) -> str:
|
117
|
+
return await self.agent_instance._build_neuro_prompt(messages)
|
118
|
+
|
116
119
|
async def get_message_history(self, limit: int = 20) -> List[Dict[str, Any]]:
|
117
120
|
return await self.agent_instance.get_neuro_history(limit)
|
@@ -63,7 +63,7 @@ class LiveStreamManager:
|
|
63
63
|
"""Puts the stream metadata into the event queue for broadcasting."""
|
64
64
|
metadata_event = {
|
65
65
|
"type": "update_stream_metadata",
|
66
|
-
**config_manager.settings.
|
66
|
+
**config_manager.settings.stream.model_dump()
|
67
67
|
}
|
68
68
|
await self.event_queue.put(metadata_event)
|
69
69
|
|
neuro_simulator/utils/queue.py
CHANGED
@@ -30,11 +30,11 @@ def initialize_queues():
|
|
30
30
|
# Re-initialize the deques with the correct maxlen
|
31
31
|
audience_chat_buffer = deque(
|
32
32
|
audience_chat_buffer,
|
33
|
-
maxlen=settings.
|
33
|
+
maxlen=settings.server.audience_chat_buffer_max_size
|
34
34
|
)
|
35
35
|
neuro_input_queue = deque(
|
36
36
|
neuro_input_queue,
|
37
|
-
maxlen=settings.
|
37
|
+
maxlen=settings.neuro.neuro_input_queue_max_size
|
38
38
|
)
|
39
39
|
|
40
40
|
def clear_all_queues():
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: neuro_simulator
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.6.1
|
4
4
|
Summary: Neuro Simulator Server
|
5
5
|
Project-URL: Homepage, https://github.com/Moha-Master/neuro-simulator
|
6
6
|
Project-URL: Repository, https://github.com/Moha-Master/neuro-simulator
|
@@ -22,7 +22,6 @@ Requires-Dist: azure-cognitiveservices-speech
|
|
22
22
|
Requires-Dist: fastapi
|
23
23
|
Requires-Dist: google-genai
|
24
24
|
Requires-Dist: jinja2
|
25
|
-
Requires-Dist: letta-client
|
26
25
|
Requires-Dist: mutagen
|
27
26
|
Requires-Dist: openai
|
28
27
|
Requires-Dist: pydantic
|
@@ -1,12 +1,11 @@
|
|
1
1
|
README.md,sha256=32Bfey7Pf2nAKO3ORsLHUoyg8XB6mP0Lh9ftU-uCuH8,6314
|
2
2
|
WEBSOCKET_API.md,sha256=LkItXviJL-0DGqX85CSB9LAmcnj2cAnBzETvPIjRY8U,9203
|
3
|
-
requirements.txt,sha256=
|
3
|
+
requirements.txt,sha256=4QYJ4CX6Q4nt2ShHwMuLZaRSM7wg8au-RX0i_rMVl7k,116
|
4
4
|
neuro_simulator/__init__.py,sha256=-tposzyvg6UckPcfSvtc03UjxBa9oCe_zRvlKf8splk,31
|
5
|
-
neuro_simulator/cli.py,sha256=
|
6
|
-
neuro_simulator/config.yaml.example,sha256=M-uCuDj-0XvM6BuFNQT9rsFHL_t71UK0jWVSuF6nL6Q,4732
|
5
|
+
neuro_simulator/cli.py,sha256=nG2-Ih7yF6ipxwoLrpfFORHHIC-DgqPEldipDecZH48,4261
|
7
6
|
neuro_simulator/agent/__init__.py,sha256=t52CZlyTGWqcGjMs90qvpFpRckY2WSSlO7r_H3K_mSY,32
|
8
7
|
neuro_simulator/agent/core.py,sha256=_UkxMV1S33VHjD1JFlKz17GpaDhHQGNA9s9dsRgd3j0,9561
|
9
|
-
neuro_simulator/agent/llm.py,sha256=
|
8
|
+
neuro_simulator/agent/llm.py,sha256=eWqiXOCDB6i82KsayGjNs04SUiUhYWX3mi1OhWwmPtI,4543
|
10
9
|
neuro_simulator/agent/memory_prompt.txt,sha256=wdpdnbOYhMKgPJnnGlcSejGdt2uItrXzDgz9_8cKnqw,824
|
11
10
|
neuro_simulator/agent/neuro_prompt.txt,sha256=WSN5Fa6AwVnJaSFhz98fQTb2EtQ35U6w2qga_C-s1Go,1438
|
12
11
|
neuro_simulator/agent/memory/__init__.py,sha256=YJ7cynQJI6kD7vjyv3rKc-CZqmoYSuGQtRZl_XdGEps,39
|
@@ -33,15 +32,15 @@ neuro_simulator/api/__init__.py,sha256=5LWyDSayPGdQS8Rv13nmAKLyhPnMVPyTYDdvoMPB4
|
|
33
32
|
neuro_simulator/api/system.py,sha256=hPmtj2YF0UeTVTbO7qhtCDmrlN0hGBJrlhbIgGFIJz0,1262
|
34
33
|
neuro_simulator/assets/neuro_start.mp4,sha256=xCLnNzv4THnzRYwkdV6EiqXc-XtFd867R2ZVLDvNp0Y,8226418
|
35
34
|
neuro_simulator/chatbot/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
36
|
-
neuro_simulator/chatbot/core.py,sha256=
|
37
|
-
neuro_simulator/chatbot/llm.py,sha256=
|
35
|
+
neuro_simulator/chatbot/core.py,sha256=qtNRkEf1oXM9U9eRp13jGHZORgy9iViHQsxepIxou1U,11259
|
36
|
+
neuro_simulator/chatbot/llm.py,sha256=_Drpljpi54yXfH-dUpRk6Pzxe4-xeUzqP56xFohhlwU,4528
|
38
37
|
neuro_simulator/chatbot/memory/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
39
38
|
neuro_simulator/chatbot/memory/core_memory.json,sha256=THAls7usPrFDRNSw3AoptRJrqQJO0f5FLUH5jAXlCek,423
|
40
39
|
neuro_simulator/chatbot/memory/init_memory.json,sha256=be8sr0_jAwfjikkPuebeRwjCe20ccd0nYGe0winEVLU,450
|
41
40
|
neuro_simulator/chatbot/memory/manager.py,sha256=K84EEH-gRPksgt7GcNxvEVo60aHxaOTC3dZMf2rR9bQ,3827
|
42
41
|
neuro_simulator/chatbot/memory/temp_memory.json,sha256=T1PNoYwrqgwDVLtfmj7L5e0Sq02OEbqHPC8RFhICuUU,2
|
43
42
|
neuro_simulator/chatbot/nickname_gen/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
44
|
-
neuro_simulator/chatbot/nickname_gen/generator.py,sha256=
|
43
|
+
neuro_simulator/chatbot/nickname_gen/generator.py,sha256=szDv26jo8PITO4F-NtgJhaw3yHGtlw9xAcx66Sn00eg,6348
|
45
44
|
neuro_simulator/chatbot/nickname_gen/data/adjectives.txt,sha256=DuEDOYAlZHcLMPIp-l3KEPQNHLiCk5pfOK51x4CoR28,48
|
46
45
|
neuro_simulator/chatbot/nickname_gen/data/nouns.txt,sha256=YQc3aIXjz-SACFxP3Zmx4msJ3iUyXNP8wEF_wLYxvwE,40
|
47
46
|
neuro_simulator/chatbot/nickname_gen/data/special_users.txt,sha256=acJyl3EQSmcLqvCed16Zp9WYSwB_bdVj9oKno_qPds8,117
|
@@ -51,53 +50,87 @@ neuro_simulator/chatbot/prompts/memory_prompt.txt,sha256=LfNi4ZoYls2soKCM39xBqyn
|
|
51
50
|
neuro_simulator/chatbot/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
52
51
|
neuro_simulator/chatbot/tools/add_temp_memory.py,sha256=ZsqvVx1cZMyjVFTo8ICxdhuk72K2kF17N9imDASODz8,1884
|
53
52
|
neuro_simulator/chatbot/tools/base.py,sha256=YebWl1Y0uyMDzehxXWpmbQfPxGcZg1n3cJO2l13wRdc,1208
|
54
|
-
neuro_simulator/chatbot/tools/manager.py,sha256=
|
53
|
+
neuro_simulator/chatbot/tools/manager.py,sha256=wPFVFdQg0Z10yjWKcupn9oYbPtXHh30uepplBzbFWd4,5018
|
55
54
|
neuro_simulator/chatbot/tools/post_chat_message.py,sha256=lchGCSQKzPZgb1z__MIDkG2Cxn_nAN3ISsNkYGbpTsg,1775
|
56
55
|
neuro_simulator/core/__init__.py,sha256=-ojq25c8XA0CU25b0OxcGjH4IWFEDHR-HXSRSZIuKe8,57
|
57
|
-
neuro_simulator/core/agent_factory.py,sha256=
|
56
|
+
neuro_simulator/core/agent_factory.py,sha256=jX7wRyTS7Jd-qfIGj0kGs_0pblx5zUcyVAyRETIUhvw,1359
|
58
57
|
neuro_simulator/core/agent_interface.py,sha256=ZXUCtkQUvsBQ5iCb0gTILJaShn5KmSrEgKhd7PK18HE,2794
|
59
|
-
neuro_simulator/core/application.py,sha256=
|
60
|
-
neuro_simulator/core/config.py,sha256=
|
61
|
-
neuro_simulator/core/path_manager.py,sha256=
|
58
|
+
neuro_simulator/core/application.py,sha256=xgXLwYzq71AkiFLSn2L_hePuUp9sA0Eknb_DxjEeNDE,30292
|
59
|
+
neuro_simulator/core/config.py,sha256=eH5LdTm7gtLBqV7bbiUulYTW2abKYUmK934x3zOS19w,4766
|
60
|
+
neuro_simulator/core/path_manager.py,sha256=_MK3S5ab30zT9zDISC-noDbVE8Axs5y1A3WgImqD-wI,4284
|
62
61
|
neuro_simulator/services/__init__.py,sha256=s3ZrAHg5TpJakadAAGY1h0wDw_xqN4Je4aJwJyRBmk4,61
|
63
|
-
neuro_simulator/services/audio.py,sha256=
|
64
|
-
neuro_simulator/services/builtin.py,sha256=
|
65
|
-
neuro_simulator/services/
|
66
|
-
neuro_simulator/services/stream.py,sha256=9k8bNnQu237WMf1qX8OMfItAPEZkaZ4NEiI4FQ_7Ww4,6058
|
62
|
+
neuro_simulator/services/audio.py,sha256=tdjl03JY2t_KifwZVT7lRBr5LCkxAkvE8jk91ZblCOQ,4525
|
63
|
+
neuro_simulator/services/builtin.py,sha256=7YXi74MNqAjBT8GsdiIoaCpMWtsn_tzt73aTByLSkAI,6248
|
64
|
+
neuro_simulator/services/stream.py,sha256=r-dYdOk1vV4Fehd0BIlUqKQuPFV3sLbVVtilFLs8XkI,6049
|
67
65
|
neuro_simulator/utils/__init__.py,sha256=xSEFzjT827W81mNyQ_DLtr00TgFlttqfFgpz9pSxFXQ,58
|
68
66
|
neuro_simulator/utils/logging.py,sha256=fAM8mW4czr0RLgAUS6oN-YTWKj5daqwc5g7yjyAgaPw,3892
|
69
67
|
neuro_simulator/utils/process.py,sha256=9OYWx8fzaJZqmFUcjQX37AnBhl7YWvrLxDWBa30vqwU,3192
|
70
|
-
neuro_simulator/utils/queue.py,sha256=
|
68
|
+
neuro_simulator/utils/queue.py,sha256=fJ0c7pwdAoUrLGC0qudehABkoBB7-pzROvmj_nA9D1c,2690
|
71
69
|
neuro_simulator/utils/state.py,sha256=DdBqSAYfjOFtJfB1hEGhYPh32r1ZvFuVlN_-29_-luA,664
|
72
70
|
neuro_simulator/utils/websocket.py,sha256=fjC-qipzjgM_e7XImP12DFmLhvxkMOSr2GnUWws7esE,2058
|
71
|
+
neuro_simulator/client/avatar.webp,sha256=gLkJF8g-akjXPXBzr_FRYmTt9RM9oXEmDnIEh12DkZs,25884
|
72
|
+
neuro_simulator/client/background.webp,sha256=JD9OFItvxSm0xQ8jRJZ9eiXLZ1R-1xZXd7EMWr4b170,1174858
|
73
|
+
neuro_simulator/client/background_old.webp,sha256=10Jv9ElOAvpysZUTPw24tC7kKi2-oi6x7KuvI9bE9aU,51214
|
74
|
+
neuro_simulator/client/banner.jpeg,sha256=LFqSS0alXwQPilUnHNZ4qkx63Jbc5VYF0HsJOiM5Nug,448732
|
75
|
+
neuro_simulator/client/channel_points.png,sha256=Tmy9kmKQWNfK-gPMKVvUYrpEiT3CsPgSx6V1-PJRBhI,11509
|
76
|
+
neuro_simulator/client/error.mp3,sha256=ovZ-JXAHrqYUkjFshP48_3ZQcoRi7gUxO_ZkShoeIyA,24048
|
77
|
+
neuro_simulator/client/favicon.ico,sha256=8mR4U-Ufv6l8_Md9C6yqbv6mZ0WV9DRLSPpms8WKp4g,370418
|
78
|
+
neuro_simulator/client/index.html,sha256=nlFEBvqmI2WtW_htLeJyY2-o9iYLEeYjTfk6eVOFHqE,22427
|
79
|
+
neuro_simulator/client/neuro_start.mp4,sha256=xCLnNzv4THnzRYwkdV6EiqXc-XtFd867R2ZVLDvNp0Y,8226418
|
80
|
+
neuro_simulator/client/neurosama.png,sha256=FTyEEEu0XwRxicKtmQXQONiRVhYKgTsPqlOO2Ymbp1c,1447110
|
81
|
+
neuro_simulator/client/sc_pink.png,sha256=bmC1Wn8I27nsc9lkQJ8-LeacL6Y-eOZor_JkmXy9Om0,56768
|
82
|
+
neuro_simulator/client/sc_purple.png,sha256=XUs6fB0CHPTzQQ3npS1rje5gcigy-T4uao8k3RxOk50,57224
|
83
|
+
neuro_simulator/client/sub_badge.svg,sha256=-Es6Nz9sd7c3sJ4Mys2q0vSd7AZVC9uE-Sq4ipCsioo,825
|
84
|
+
neuro_simulator/client/user_avatar.jpg,sha256=j2MZCFm0MYmigPPOLsuFqA8PhvQ5SWb0GTpqb9VKqvY,29625
|
85
|
+
neuro_simulator/client/assets/index-C_kzLmQy.css,sha256=ldHgSwFauTDidMP-jwCYOWpFSFsjJp-3FcqSniVfkFk,27793
|
86
|
+
neuro_simulator/client/assets/index-DRLWJPZv.js,sha256=5sAhfYAN0xKCbG6iZv20bjA7CaXr4zmqR57wd5ko14o,37340
|
87
|
+
neuro_simulator/client/assets/inter-cyrillic-400-normal-BLGc9T1a.woff2,sha256=Y20TqrBe2fpJ3xnFf93btvPQhPRjdD7lJXVJ27cSQAU,7712
|
88
|
+
neuro_simulator/client/assets/inter-cyrillic-400-normal-alAqRL36.woff,sha256=GmDEQlTts7GpPN_vX-7Kqig5IarhIL_nICL6SWvtq5Y,9780
|
89
|
+
neuro_simulator/client/assets/inter-cyrillic-ext-400-normal-BE2fNs0E.woff,sha256=RHF2hsw99YHFTevMHQw7zGUUaXtPsetnWZbP0cfZaYA,13336
|
90
|
+
neuro_simulator/client/assets/inter-cyrillic-ext-400-normal-Dc4VJyIJ.woff2,sha256=7zI9hOR108QsGhOSH8Ic5nyJ_-o4Fed_J8BdH_JfLUI,10216
|
91
|
+
neuro_simulator/client/assets/inter-greek-400-normal-C3I71FoW.woff,sha256=qtjBnZ0fZGTNL3UriqYVPfuO_Pyp80PLeOV9XYi1p30,9924
|
92
|
+
neuro_simulator/client/assets/inter-greek-400-normal-DxZsaF_h.woff2,sha256=FQ3EOR5Wh4Jt9M38kM_sEMUHGRynqpC2gnIgVPO7wN4,7840
|
93
|
+
neuro_simulator/client/assets/inter-greek-ext-400-normal-Bput3-QP.woff2,sha256=q1Jss0CSlwz0KQttNYi8vaCXFJPsWr6l9bVy4IZgF-w,5232
|
94
|
+
neuro_simulator/client/assets/inter-greek-ext-400-normal-XIH6-K3k.woff,sha256=TqEseb219Xmc_lFEyJ-HsKZ_pBXvoISQ6Tg9G3JEbCg,7064
|
95
|
+
neuro_simulator/client/assets/inter-latin-400-normal-C38fXH4l.woff2,sha256=iQmQSrbIcuuZQJNIKoiijsos2VkS17b-zXIQOw3Aftw,23664
|
96
|
+
neuro_simulator/client/assets/inter-latin-400-normal-CyCys3Eg.woff,sha256=4g-gtP0t0m5NFLOsPMkiUJw6Y_pekQ6QxhRUSqBC3UU,30696
|
97
|
+
neuro_simulator/client/assets/inter-latin-ext-400-normal-77YHD8bZ.woff,sha256=Iq6DYPutJNKvfGyYmKNGyIF3Tch_fPlL0mLEitWNcRY,47560
|
98
|
+
neuro_simulator/client/assets/inter-latin-ext-400-normal-C1nco2VV.woff2,sha256=Z0Sn9QnrxqsiCmzU6nfomK3wFPA9iNzaXUXYqf7vtOk,35000
|
99
|
+
neuro_simulator/client/assets/inter-vietnamese-400-normal-Bbgyi5SW.woff,sha256=VKpC0yW839Yj7LnqxKXjxkIMY9e4bp2FRftHn2U761c,6500
|
100
|
+
neuro_simulator/client/assets/inter-vietnamese-400-normal-DMkecbls.woff2,sha256=VHrZ_a6wrkNIf0uKAuR8NlU8DAy3PIqpj5O3thX2tV0,4972
|
101
|
+
neuro_simulator/client/fonts/causten.woff2,sha256=ttA0YdxaFPh3eaerSiQ7JC3zwls7GadBhnWIa7jO2Lg,23820
|
102
|
+
neuro_simulator/client/fonts/comic.woff2,sha256=8sW4Je7yeNTCVtBgLdBYcFgG5Se9hTLN7S10qhoV1b0,142392
|
103
|
+
neuro_simulator/client/fonts/first-coffee.woff2,sha256=pUBfpDh_6HQ20V9EuKWq2UFLnMi9RPHigLN2rOU9Jps,11496
|
104
|
+
neuro_simulator/client/fonts/noto-sans-sc.woff2,sha256=KsZkKouZc8g1eQ_5wzOWuGkIcSYzGGsHYZJhyu0hFDg,4182468
|
73
105
|
neuro_simulator/dashboard/favicon.ico,sha256=8mR4U-Ufv6l8_Md9C6yqbv6mZ0WV9DRLSPpms8WKp4g,370418
|
74
106
|
neuro_simulator/dashboard/first-coffee.woff2,sha256=pUBfpDh_6HQ20V9EuKWq2UFLnMi9RPHigLN2rOU9Jps,11496
|
75
|
-
neuro_simulator/dashboard/index.html,sha256=
|
76
|
-
neuro_simulator/dashboard/assets/AgentView-
|
107
|
+
neuro_simulator/dashboard/index.html,sha256=ClWlZyXnWx8VnCKyxANGG39z3B0ecsfLMCDpSgrmfFI,489
|
108
|
+
neuro_simulator/dashboard/assets/AgentView-DBq2msN_.js,sha256=Il81G74VymiZ_Jn3p4mjBQjVluEa4f7Dt6hhLEQuBu0,2413
|
77
109
|
neuro_simulator/dashboard/assets/AgentView-TDgmx5bK.css,sha256=UjBaTbzD4yiDxAHXC5rSSgY-tDFyBfVYS_O1VNcmoYU,361
|
78
|
-
neuro_simulator/dashboard/assets/ChatBotView-
|
110
|
+
neuro_simulator/dashboard/assets/ChatBotView-BqQsuJUv.js,sha256=YdaDcUiIRvT7NQdtRWFZoArLy2DPX-zyVMTZZrS46_c,2246
|
79
111
|
neuro_simulator/dashboard/assets/ChatBotView-Dyd6g14G.css,sha256=61Z9sVqq9scsOWZJaOslumxe8Q0I_leQGY4jxy1Zm9o,367
|
80
|
-
neuro_simulator/dashboard/assets/ConfigView-
|
112
|
+
neuro_simulator/dashboard/assets/ConfigView-CPYMgl_d.js,sha256=bg0E8zHlMPqEQsFXsD3FBGV7aQT5lh1RIfLnQg_mQ2M,2932
|
113
|
+
neuro_simulator/dashboard/assets/ConfigView-aFribfyR.css,sha256=ubCvxhHoetmZ-Dr1BhA5WzniPouxSTHrVNUF_ernK8E,51
|
114
|
+
neuro_simulator/dashboard/assets/ContextTab-BSROkcd2.js,sha256=rcKaY2Ya2bckj-ucnwz36VPwJ18VRj3xx91TkIeX2L8,1249
|
81
115
|
neuro_simulator/dashboard/assets/ContextTab-DyPsixHQ.css,sha256=OuDxYxHQE6vR0K0olHcct5JbfJ8dRZqwsLoM6HUrJdY,306
|
82
|
-
neuro_simulator/dashboard/assets/ContextTab-GRHICOS3.js,sha256=3hgFNCnuE6bhTaHNx8wZ4qV41SYeE36HXlIzSq_JjFk,1249
|
83
116
|
neuro_simulator/dashboard/assets/ControlView-BUCt3umR.css,sha256=Nspx07838NWMuUKrWJCRgwRBdjl-zezVBzUSfdDBsiU,108
|
84
|
-
neuro_simulator/dashboard/assets/ControlView-
|
85
|
-
neuro_simulator/dashboard/assets/FieldRenderer-
|
86
|
-
neuro_simulator/dashboard/assets/LogsTab-
|
117
|
+
neuro_simulator/dashboard/assets/ControlView-BvflkxO-.js,sha256=Kt2cVQ0a8tJ3YCbe4QYVPvQjK_KW8Kqfd41W3xgFCL0,1549
|
118
|
+
neuro_simulator/dashboard/assets/FieldRenderer-DyPAEyOT.js,sha256=3f0uIZkMMGjNYF18vgfKVF4by9jHJ2VVMlpzXBEVuEQ,7598
|
119
|
+
neuro_simulator/dashboard/assets/LogsTab-C-SZhHdN.js,sha256=sXEOoH7mEovSuKOzdxLceZGSurTRkUVCg8J_yrpvc_s,542
|
87
120
|
neuro_simulator/dashboard/assets/LogsTab-wg3i3S6b.css,sha256=hRDoXwSnuvWe9vt-lh8XbMiJTS-WV-HTHf3-JOmkfuE,254
|
88
|
-
neuro_simulator/dashboard/assets/LogsView-
|
121
|
+
neuro_simulator/dashboard/assets/LogsView-82wOs2Pp.js,sha256=RLTJXNzKxDID08imN9zdTHYqwNV-5MvvoIWQ5AzXD00,788
|
89
122
|
neuro_simulator/dashboard/assets/LogsView-D2F8f-Mc.css,sha256=69G8eFicz4WLe-f3mnn7YMfo-odPHM7gcRT160oNgGo,254
|
90
|
-
neuro_simulator/dashboard/assets/MemoryTab-BSUWFbcV.js,sha256=1tc8jeFIDFE-2KjYckXOj_MB9f70EL2Ap26eRy8SVVc,9508
|
91
123
|
neuro_simulator/dashboard/assets/MemoryTab-DPthi6jg.css,sha256=yZNqQVtHqNjjsKz3eCRmcuuYi4kKQFMTUHiWEHbOeHY,151
|
92
|
-
neuro_simulator/dashboard/assets/
|
93
|
-
neuro_simulator/dashboard/assets/
|
94
|
-
neuro_simulator/dashboard/assets/index-
|
124
|
+
neuro_simulator/dashboard/assets/MemoryTab-p3Q-Wa4e.js,sha256=lGoeWPr1EiOymbQhYp4p8qblOznto7J1R5exhp3Dy8w,9508
|
125
|
+
neuro_simulator/dashboard/assets/ToolsTab-BxbFZhXs.js,sha256=P-0M57p5JNYotkITplN9P5KzC5bTDbHxObbM8pJ7EjU,3694
|
126
|
+
neuro_simulator/dashboard/assets/index-Ba5ZG3QB.js,sha256=C5lgcP6ubbGwngH5_WKcd5C0agl-sjhyBvICWaGF9ZQ,629137
|
127
|
+
neuro_simulator/dashboard/assets/index-CcYt9OR6.css,sha256=aw0iyjqWqN0owGgSVd8UFD9vZMd6GI7lc7ey3WYQ05I,804934
|
95
128
|
neuro_simulator/dashboard/assets/materialdesignicons-webfont-B7mPwVP_.ttf,sha256=YeirpaTpgf4iz3yOi82-oAR251xiw38Bv37jM2HWhCg,1307660
|
96
129
|
neuro_simulator/dashboard/assets/materialdesignicons-webfont-CSr8KVlo.eot,sha256=CxgxBNL8XyYZbnc8d72vLgVQn9QlnS0V7O3Kebh-hPk,1307880
|
97
130
|
neuro_simulator/dashboard/assets/materialdesignicons-webfont-Dp5v-WZN.woff2,sha256=Zi_vqPL4qVwYWI0hd0eJwQfGTnccvmWmmvRikcQxGvw,403216
|
98
131
|
neuro_simulator/dashboard/assets/materialdesignicons-webfont-PXm3-2wK.woff,sha256=pZKKDVwvYk5G-Y2bFcL2AEU3f3xZTdeKF1kTLqO0Y-s,587984
|
99
|
-
neuro_simulator-0.
|
100
|
-
neuro_simulator-0.
|
101
|
-
neuro_simulator-0.
|
102
|
-
neuro_simulator-0.
|
103
|
-
neuro_simulator-0.
|
132
|
+
neuro_simulator-0.6.1.dist-info/METADATA,sha256=_uIC9ykhARn1EvQ6-DhDymJ0xOhxAYSkZpMJ12UOt7k,11242
|
133
|
+
neuro_simulator-0.6.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
134
|
+
neuro_simulator-0.6.1.dist-info/entry_points.txt,sha256=qVd5ypnRRgU8Cw7rWfZ7o0OXyS9P9hgY-cRoN_mgz9g,51
|
135
|
+
neuro_simulator-0.6.1.dist-info/licenses/LICENSE,sha256=cPsKhVNOnNSSva44vcCU-SDDFf8iE-EhpGXCiUK9tAM,1072
|
136
|
+
neuro_simulator-0.6.1.dist-info/RECORD,,
|
requirements.txt
CHANGED
@@ -1,117 +0,0 @@
|
|
1
|
-
# --- API密钥配置(无法通过外部控制面板修改) ---
|
2
|
-
api_keys:
|
3
|
-
# Letta API Token - 用于与 Letta 服务进行身份验证
|
4
|
-
# 如果你自建 Letta Server 且没有设置 token,可以留空
|
5
|
-
letta_token: "YOUR_LETTA_TOKEN_HERE"
|
6
|
-
|
7
|
-
# Letta Server 基础 URL - 如果你自建 Letta Server 请填写完整地址,否则留空以使用Letta Cloud
|
8
|
-
letta_base_url: ""
|
9
|
-
|
10
|
-
# Neuro Agent ID - 在 Letta 中创建的 Agent 的唯一标识符
|
11
|
-
neuro_agent_id: "YOUR_AGENT_ID_HERE"
|
12
|
-
|
13
|
-
# Gemini API Key - 用于调用 Google Gemini API 生成观众聊天内容
|
14
|
-
gemini_api_key: "YOUR_GEMINI_KEY_HERE"
|
15
|
-
|
16
|
-
# OpenAI API Key - 用于调用兼容 OpenAI 的 API 生成观众聊天内容
|
17
|
-
openai_api_key: "YOUR_OPENAI_KEY_HERE"
|
18
|
-
|
19
|
-
# OpenAI API 基础 URL - 如果使用第三方兼容 OpenAI API 服务(如 SiliconFlow)请填写对应地址
|
20
|
-
openai_api_base_url: "YOUR_OPENAI_BASE_URL_HERE"
|
21
|
-
|
22
|
-
# Azure 语音服务密钥 - 用于调用微软 Azure TTS 服务合成语音
|
23
|
-
azure_speech_key: "YOUR_AZURE_KEY_HERE"
|
24
|
-
|
25
|
-
# Azure 语音服务区域 - Azure 服务所在的区域,如 "eastus" 或 "westus"
|
26
|
-
azure_speech_region: "YOUR_AZURE_REGION_HERE"
|
27
|
-
|
28
|
-
# --- 直播元数据配置 ---
|
29
|
-
stream_metadata:
|
30
|
-
# 主播昵称 - 显示在直播中的主播名称(此设置无法通过外部控制面板修改)
|
31
|
-
streamer_nickname: "vedal987"
|
32
|
-
|
33
|
-
# 直播标题 - 显示在直播页面的标题
|
34
|
-
stream_title: "neuro-sama is here for u all"
|
35
|
-
|
36
|
-
# 直播分类 - 直播内容的分类标签
|
37
|
-
stream_category: "谈天说地"
|
38
|
-
|
39
|
-
# 直播标签 - 用于描述直播内容的标签列表
|
40
|
-
stream_tags: ["Vtuber", "AI", "Cute", "English", "Gremlin", "catgirl"]
|
41
|
-
|
42
|
-
# --- Agent 类型设置 ---
|
43
|
-
# 选择一个用来模拟Neuro的Agent提供方
|
44
|
-
# - "letta": 使用Letta作为Agent,需要在上方配置Letta API相关信息
|
45
|
-
# - "builtin": 使用内建Agent,请在下方填写配置
|
46
|
-
agent_type: "builtin"
|
47
|
-
|
48
|
-
# --- 内建Agent设置 ---
|
49
|
-
# 仅当agent_type设置为"builtin"时生效
|
50
|
-
agent:
|
51
|
-
# Agent的API服务商,支持"gemini"和"openai",API Key配置使用顶部填写的值
|
52
|
-
agent_provider: "gemini"
|
53
|
-
# Agent使用的模型,切换gemini/openai时记得更改
|
54
|
-
agent_model: "gemini-2.5-flash-lite"
|
55
|
-
|
56
|
-
# --- 内建 Chatbot Agent 设置 ---
|
57
|
-
# 仅当需要启用新的有状态 Chatbot Agent 时配置
|
58
|
-
chatbot_agent:
|
59
|
-
# Agent的API服务商,支持"gemini"和"openai"
|
60
|
-
agent_provider: "gemini"
|
61
|
-
# Agent使用的模型,建议使用一个速度快、成本低的模型
|
62
|
-
agent_model: "gemini-1.5-flash-latest"
|
63
|
-
# Chatbot Agent 生成间隔(秒)
|
64
|
-
generation_interval_sec: 3
|
65
|
-
# 每次生成的消息数量
|
66
|
-
chats_per_batch: 2
|
67
|
-
# 昵称生成配置
|
68
|
-
nickname_generation:
|
69
|
-
enable_dynamic_pool: true # 开关:是否在启动时动态生成词库
|
70
|
-
dynamic_pool_size: 50 # 动态生成池的大小(形容词和名词各50个)
|
71
|
-
|
72
|
-
# --- Neuro 行为与节奏控制 ---
|
73
|
-
neuro_behavior:
|
74
|
-
# 输入聊天采样数量 - 每次生成 Neuro 回复时从观众聊天中采样的消息数量,不建议太长
|
75
|
-
input_chat_sample_size: 10
|
76
|
-
|
77
|
-
# 说话后冷却时间(秒) - Neuro 每次说完话后的等待时间
|
78
|
-
post_speech_cooldown_sec: 1.0
|
79
|
-
|
80
|
-
# 初始问候语 - 直播开始时给 Neuro 的系统提示语
|
81
|
-
initial_greeting: "The stream has just started. Greet your audience and say hello!"
|
82
|
-
|
83
|
-
# --- 音频合成 (TTS) 配置 ---
|
84
|
-
tts:
|
85
|
-
# 语音名称 - 不要调整这个设置
|
86
|
-
voice_name: "en-US-AshleyNeural"
|
87
|
-
|
88
|
-
# 语音音调 - 除非你不想听Neuro的声音
|
89
|
-
voice_pitch: 1.25
|
90
|
-
|
91
|
-
# --- 数据流与性能配置 ---
|
92
|
-
performance:
|
93
|
-
# 输入队列最大大小 - 可能被提供给 Neuro 作为输入的聊天消息最大数量
|
94
|
-
# 具体逻辑是在 neuro_input_queue_max_size 中抽取 input_chat_sample_size 条消息发送
|
95
|
-
neuro_input_queue_max_size: 200
|
96
|
-
|
97
|
-
# 观众聊天缓冲区最大大小 - 后端存储的聊天记录总量
|
98
|
-
audience_chat_buffer_max_size: 1000
|
99
|
-
|
100
|
-
# 客户端初始聊天数 - 向新客户端发送的历史聊天消息数量,主要用来应对中途加入的客户端
|
101
|
-
initial_chat_backlog_limit: 50
|
102
|
-
|
103
|
-
# --- 服务器配置 ---
|
104
|
-
server:
|
105
|
-
# 服务器主机地址 - 服务器监听的主机地址(使用 uvicorn 命令启动时此设置无效)
|
106
|
-
host: "127.0.0.1"
|
107
|
-
|
108
|
-
# 服务器端口 - 服务器监听的端口号(使用 uvicorn 命令启动时此设置无效)
|
109
|
-
port: 8000
|
110
|
-
|
111
|
-
# 面板密码 - 设置 API token 用于外部控制面板的身份验证,在公网持续部署时强烈建议开启
|
112
|
-
panel_password: "your-secret-api-token-here"
|
113
|
-
|
114
|
-
# 客户端来源 - 允许跨域访问的客户端地址列表,非本机访问时记得添加一下
|
115
|
-
client_origins:
|
116
|
-
- "http://localhost:5173"
|
117
|
-
- "http://127.0.0.1:5173"
|
@@ -1,2 +0,0 @@
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/FieldRenderer-DaTYxmtO.js","assets/index-BiAhe8fO.js","assets/index-C7dox9UB.css"])))=>i.map(i=>d[i]);
|
2
|
-
import{d as N,i as A,a as E,j as g,k as G,l as L,m as s,e as r,g as O,b as n,w as l,F as k,n as w,f as V,o,c as h,t as $,h as D,p as M,q as P}from"./index-BiAhe8fO.js";const R={key:0,class:"text-center pa-10"},T={key:1},I=N({__name:"ConfigView",setup(U){const S=M(()=>P(()=>import("./FieldRenderer-DaTYxmtO.js"),__vite__mapDeps([0,1,2]))),c=A(),b=E(),_=g(!0),u=g(null),f=g(!1),C=G(()=>{const a=c.schema;return!a||!a.properties?[]:Object.keys(a.properties).map(e=>{const i=a.properties[e];if(i.$ref){const v=i.$ref.split("/").pop()||"",d=a.$defs?.[v]||{},p=d.properties||{};return{key:e,title:d.title||e,isGroup:!0,properties:Object.keys(p).map(m=>({key:m,schema:p[m]}))}}return{key:e,title:i.title||e,isGroup:!1,properties:[{key:e,schema:i}]}})});async function x(){if(b.isConnected){f.value=!0;try{await b.sendAdminWsMessage("update_configs",c.config),console.log("Config saved successfully!")}catch(a){console.error("Failed to save config:",a)}finally{f.value=!1}}}return L(async()=>{_.value=!0;try{await c.fetchSchema(),await c.fetchConfig()}finally{_.value=!1}}),(a,e)=>{const i=n("v-progress-circular"),v=n("v-tab"),d=n("v-tabs"),p=n("v-btn"),m=n("v-card-actions"),j=n("v-card"),B=n("v-window-item"),F=n("v-window");return o(),s("div",null,[_.value?(o(),s("div",R,[r(i,{indeterminate:"",color:"primary"}),e[2]||(e[2]=O("p",{class:"mt-4"},"正在加载配置...",-1))])):(o(),s("div",T,[r(d,{modelValue:u.value,"onUpdate:modelValue":e[0]||(e[0]=t=>u.value=t),"bg-color":"primary",class:"mb-4",grow:""},{default:l(()=>[(o(!0),s(k,null,w(C.value,t=>(o(),h(v,{key:t.key,value:t.key},{default:l(()=>[V($(t.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"]),r(m,{class:"justify-end pa-4"},{default:l(()=>[r(p,{onClick:x,color:"primary",variant:"flat",loading:f.value},{default:l(()=>[...e[3]||(e[3]=[V("保存配置",-1)])]),_:1},8,["loading"])]),_:1}),r(F,{modelValue:u.value,"onUpdate:modelValue":e[1]||(e[1]=t=>u.value=t),eager:""},{default:l(()=>[(o(!0),s(k,null,w(C.value,t=>(o(),h(B,{key:t.key,value:t.key},{default:l(()=>[r(j,{flat:"",class:"pa-4"},{default:l(()=>[(o(!0),s(k,null,w(t.properties,y=>(o(),s("div",{key:y.key},[r(D(S),{"group-key":t.isGroup?t.key:null,"prop-key":y.key,"prop-schema":y.schema},null,8,["group-key","prop-key","prop-schema"])]))),128))]),_:2},1024)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]))])}}});export{I as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{d as f,i as b,k as S,b as p,m as V,o as a,c as r,y as d}from"./index-BiAhe8fO.js";const g={class:"mb-6"},k=f({__name:"FieldRenderer",props:{groupKey:{},propKey:{},propSchema:{}},setup(e){const o=e,m=b();function i(u){return o.propSchema.type===u?!0:Array.isArray(o.propSchema.anyOf)?o.propSchema.anyOf.some(t=>t.type===u):!1}const l=S({get(){return o.groupKey?m.config[o.groupKey]?.[o.propKey]:m.config[o.propKey]},set(u){o.groupKey?(m.config[o.groupKey]||(m.config[o.groupKey]={}),m.config[o.groupKey][o.propKey]=u):m.config[o.propKey]=u}});return(u,t)=>{const c=p("v-text-field"),s=p("v-textarea"),y=p("v-switch"),h=p("v-select"),v=p("v-combobox");return a(),V("div",g,[i("integer")||i("number")?(a(),r(c,{key:0,modelValue:l.value,"onUpdate:modelValue":t[0]||(t[0]=n=>l.value=n),modelModifiers:{number:!0},label:e.propSchema.title||e.propKey,hint:e.propSchema.description,type:"number","persistent-hint":"",variant:"outlined",density:"compact"},null,8,["modelValue","label","hint"])):i("string")&&e.propSchema.format==="password"?(a(),r(c,{key:1,modelValue:l.value,"onUpdate:modelValue":t[1]||(t[1]=n=>l.value=n),label:e.propSchema.title||e.propKey,hint:e.propSchema.description,type:"password","persistent-hint":"",variant:"outlined",density:"compact"},null,8,["modelValue","label","hint"])):i("string")&&e.propSchema.format==="text-area"?(a(),r(s,{key:2,modelValue:l.value,"onUpdate:modelValue":t[2]||(t[2]=n=>l.value=n),label:e.propSchema.title||e.propKey,hint:e.propSchema.description,"persistent-hint":"",variant:"outlined"},null,8,["modelValue","label","hint"])):i("string")&&!e.propSchema.enum?(a(),r(c,{key:3,modelValue:l.value,"onUpdate:modelValue":t[3]||(t[3]=n=>l.value=n),label:e.propSchema.title||e.propKey,hint:e.propSchema.description,"persistent-hint":"",variant:"outlined",density:"compact"},null,8,["modelValue","label","hint"])):d("",!0),i("boolean")?(a(),r(y,{key:4,modelValue:l.value,"onUpdate:modelValue":t[4]||(t[4]=n=>l.value=n),label:e.propSchema.title||e.propKey,hint:e.propSchema.description,"persistent-hint":"",color:"primary",inset:""},null,8,["modelValue","label","hint"])):d("",!0),e.propSchema.enum?(a(),r(h,{key:5,modelValue:l.value,"onUpdate:modelValue":t[5]||(t[5]=n=>l.value=n),items:e.propSchema.enum,label:e.propSchema.title||e.propKey,hint:e.propSchema.description,"persistent-hint":"",variant:"outlined",density:"compact"},null,8,["modelValue","items","label","hint"])):d("",!0),i("array")?(a(),r(v,{key:6,modelValue:l.value,"onUpdate:modelValue":t[6]||(t[6]=n=>l.value=n),label:e.propSchema.title||e.propKey,hint:e.propSchema.description,"persistent-hint":"",chips:"",multiple:"","closable-chips":"",variant:"outlined",density:"compact"},null,8,["modelValue","label","hint"])):d("",!0)])}}});export{k as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{d as r,s as l,j as c,v as g,m as s,o as t,F as u,n as i,t as _,h as p,x as f,_ as d}from"./index-BiAhe8fO.js";const m=r({__name:"LogsTab",setup(v){const a=l(),e=c(null);return g(()=>a.agentLogs.length,async()=>{await f(),e.value&&(e.value.scrollTop=e.value.scrollHeight)},{deep:!0}),(L,h)=>(t(),s("div",{ref_key:"logsContainer",ref:e,class:"logs-output"},[(t(!0),s(u,null,i(p(a).agentLogs,(o,n)=>(t(),s("div",{key:`agent-${n}`,class:"log-entry"},_(o),1))),128))],512))}}),x=d(m,[["__scopeId","data-v-20098789"]]);export{x as default};
|
@@ -1 +0,0 @@
|
|
1
|
-
import{d as v,s as f,j as p,v as g,c as m,w as t,b as s,e as n,f as x,g as k,m as l,n as w,h as L,F as y,o as a,t as C,x as V,_ as h}from"./index-BiAhe8fO.js";const B=v({__name:"LogsView",setup(S){const o=f(),e=p(null);return g(()=>o.serverLogs.length,async()=>{await V(),e.value&&(e.value.scrollTop=e.value.scrollHeight)},{deep:!0}),(N,r)=>{const c=s("v-card-title"),_=s("v-card-text"),d=s("v-card");return a(),m(d,null,{default:t(()=>[n(c,null,{default:t(()=>[...r[0]||(r[0]=[x("Server 日志",-1)])]),_:1}),n(_,null,{default:t(()=>[k("div",{ref_key:"logsContainer",ref:e,class:"logs-output"},[(a(!0),l(y,null,w(L(o).serverLogs,(u,i)=>(a(),l("div",{key:`server-${i}`,class:"log-entry"},C(u),1))),128))],512)]),_:1})]),_:1})}}}),F=h(B,[["__scopeId","data-v-f9df559f"]]);export{F as default};
|