From cf7461ffeb4f53f3f50c9c692a2e4fdcecf17e82 Mon Sep 17 00:00:00 2001 From: Agando Date: Thu, 9 Jul 2026 06:00:32 +0200 Subject: auto: 2026-07-09_06:00 changes --- chat/chat-modules.js | 177 + chat/chat-ui.html | 2 + cheatsheet.html | 10 + downloads/CopyShader.js | 47 + downloads/EffectComposer.js | 284 ++ downloads/GLTFLoader.js | 3629 ++++++++++++++++++++ downloads/LuminosityHighPassShader.js | 71 + downloads/RenderPass.js | 74 + downloads/ShaderPass.js | 63 + downloads/TransformControls.js | 1471 ++++++++ downloads/UnrealBloomPass.js | 366 ++ downloads/dashboard.html | 643 ++++ .../evolution_plan/gunes-uygarligi-gercekci.html | 197 ++ .../evolution_plan/gunes-uygarligi-newos4.html | 135 + .../evolution_plan/gunes-uygarligi-sistem.html | 403 +++ downloads/evolution_plan/presentation.html | 812 +++++ downloads/evolution_plan/system_review.html | 829 +++++ downloads/gunes-uygarligi.html | 1379 ++++++++ downloads/gunes-uygarligi/makale.html | 877 +++++ downloads/kb.html | 481 +++ downloads/memory/newos-architecture-3d.html | 612 ++++ downloads/memory/release-arc-3d.html | 384 +++ downloads/system-analysis-report.html | 556 +++ downloads/system-review-v4.6.00.html | 603 ++++ downloads/system-review-v4.6.02.html | 767 +++++ downloads/system/program-specs.html | 265 ++ .../research-self-improving-ai-2025-2026.html | 716 ++++ downloads/system/roadmap.html | 243 ++ downloads/system/system-review-v4.6.00.html | 603 ++++ downloads/system/system-review-v4.6.02-public.html | 850 +++++ downloads/system/system-review-v4.6.02.html | 767 +++++ downloads/webX11AI_usecases.html | 1006 ++++++ help.html | 34 +- main.html | 112 +- modules/_write-probe.txt | 1 + modules/core/core-bundle.js | 3434 +++++++++++++++--- modules/core/module-aiassist.js | 934 ++++- modules/core/module-chatstudio.js | 3 +- modules/core/module-debug-supervisor.js | 701 ++++ modules/core/module-duckduckgo.js | 38 - modules/core/module-dynamicprompts.js | 102 - modules/core/module-io.js | 80 - modules/core/module-leases.js | 17 +- modules/core/module-loader.js | 2 +- modules/core/module-memory-graph.js | 303 +- modules/core/module-my.js | 82 - modules/core/module-neural-vfs.js | 58 +- modules/core/module-orchestrator.js | 140 +- modules/core/module-smartctx.js | 112 + modules/core/module-world-model.js | 96 +- modules/core/ollama-manager.js | 2 +- modules/core/terminal.js | 291 +- modules/core/virtual-fs.js | 12 +- modules/ext/critical-ext-bundle.js | 315 +- modules/ext/shell.js | 315 +- modules/ext/skill-pack-core.js | 298 ++ modules/ext/three.js | 1411 +++++++- modules/ext/tutorial.js | 6 +- modules/ext/voice.js | 91 +- review-glm5.2.html | 329 ++ review-kimi2.7.html | 307 ++ roadmap.html | 971 ++++++ scripts/rebuild-bundles.py | 4 + skills/advanced-web-research-workflow.json | 16 + skills/agent-orchestration.json | 4 +- skills/agentic-loop-optimization.json | 6 +- skills/backup-and-restore.json | 4 +- skills/caveman.json | 18 + skills/cron-maintenance-scheduler.json | 15 + skills/debug-deep-dive.json | 14 + skills/debug-panel-and-logs.json | 4 +- skills/dependency-graph.json | 14 + skills/floating-ui.json | 4 +- skills/loop-lesson-1783274464602.json | 14 + skills/loop-lesson-1783286927647.json | 14 + skills/loop-lesson-1783303515474.json | 14 + skills/memory-graph-update.json | 12 +- skills/mindmap-user-guide.json | 4 +- skills/mindmap-workflow.json | 4 +- skills/mobile-html-system-analyzer.json | 15 + skills/module-audit-and-test.json | 13 +- skills/module-management.json | 4 +- skills/navigating-the-terminal.json | 4 +- skills/navigating-the-terminal.md | 37 +- skills/performance-regression-protocol.json | 15 + skills/role-archetype-framework.json | 12 +- skills/role-research-analyst.json | 15 + skills/role-security-auditor.json | 15 + skills/security-and-safety.json | 4 +- skills/semantic-dependency-audit.json | 15 + skills/skills-system-guide.json | 4 +- skills/smart-context-management.json | 14 + skills/suggestion-engine.json | 13 +- skills/system-audit.json | 14 + skills/system-maintenance.json | 4 +- skills/vfs-optimizer.json | 14 + skills/web-search-and-fetch.json | 4 +- skills/webdav-operations.json | 4 +- 98 files changed, 28977 insertions(+), 1327 deletions(-) create mode 100644 downloads/CopyShader.js create mode 100644 downloads/EffectComposer.js create mode 100644 downloads/GLTFLoader.js create mode 100644 downloads/LuminosityHighPassShader.js create mode 100644 downloads/RenderPass.js create mode 100644 downloads/ShaderPass.js create mode 100644 downloads/TransformControls.js create mode 100644 downloads/UnrealBloomPass.js create mode 100644 downloads/dashboard.html create mode 100644 downloads/evolution_plan/gunes-uygarligi-gercekci.html create mode 100644 downloads/evolution_plan/gunes-uygarligi-newos4.html create mode 100644 downloads/evolution_plan/gunes-uygarligi-sistem.html create mode 100644 downloads/evolution_plan/presentation.html create mode 100644 downloads/evolution_plan/system_review.html create mode 100644 downloads/gunes-uygarligi.html create mode 100644 downloads/gunes-uygarligi/makale.html create mode 100644 downloads/kb.html create mode 100644 downloads/memory/newos-architecture-3d.html create mode 100644 downloads/memory/release-arc-3d.html create mode 100644 downloads/system-analysis-report.html create mode 100644 downloads/system-review-v4.6.00.html create mode 100644 downloads/system-review-v4.6.02.html create mode 100644 downloads/system/program-specs.html create mode 100644 downloads/system/research-self-improving-ai-2025-2026.html create mode 100644 downloads/system/roadmap.html create mode 100644 downloads/system/system-review-v4.6.00.html create mode 100644 downloads/system/system-review-v4.6.02-public.html create mode 100644 downloads/system/system-review-v4.6.02.html create mode 100644 downloads/webX11AI_usecases.html create mode 100644 modules/_write-probe.txt create mode 100644 modules/core/module-debug-supervisor.js delete mode 100644 modules/core/module-duckduckgo.js delete mode 100644 modules/core/module-dynamicprompts.js delete mode 100644 modules/core/module-io.js delete mode 100644 modules/core/module-my.js create mode 100644 review-glm5.2.html create mode 100644 review-kimi2.7.html create mode 100644 roadmap.html create mode 100644 skills/advanced-web-research-workflow.json create mode 100644 skills/caveman.json create mode 100644 skills/cron-maintenance-scheduler.json create mode 100644 skills/debug-deep-dive.json create mode 100644 skills/dependency-graph.json create mode 100644 skills/loop-lesson-1783274464602.json create mode 100644 skills/loop-lesson-1783286927647.json create mode 100644 skills/loop-lesson-1783303515474.json create mode 100644 skills/mobile-html-system-analyzer.json create mode 100644 skills/performance-regression-protocol.json create mode 100644 skills/role-research-analyst.json create mode 100644 skills/role-security-auditor.json create mode 100644 skills/semantic-dependency-audit.json create mode 100644 skills/smart-context-management.json create mode 100644 skills/system-audit.json create mode 100644 skills/vfs-optimizer.json diff --git a/chat/chat-modules.js b/chat/chat-modules.js index 295c7c9..e85cdff 100644 --- a/chat/chat-modules.js +++ b/chat/chat-modules.js @@ -398,3 +398,180 @@ function importModules() { if (document.getElementById('chat-overlay')) { loadModules(); } + +// ═══ TTS + SST Integration ═══ +var _chatTTS = false; +var _chatVoices = []; +var _chatMicRecording = false; +var _chatMediaRecorder = null; +var _chatAudioChunks = []; +var _chatRecordingTimeout = null; +var _chatSTTEndpoint = '/vmai-api/stt'; + +// Pre-load voices +if (typeof speechSynthesis !== 'undefined') { + _chatVoices = speechSynthesis.getVoices() || []; + if (_chatVoices.length === 0) { + speechSynthesis.onvoiceschanged = function() { + _chatVoices = speechSynthesis.getVoices() || []; + }; + } +} + +function toggleChatTTS() { + _chatTTS = !_chatTTS; + var btn = document.getElementById('chat-tts-btn'); + if (btn) { + btn.style.borderColor = _chatTTS ? 'var(--success-color)' : ''; + btn.style.color = _chatTTS ? 'var(--success-color)' : ''; + } + if (typeof addLog === 'function') addLog('TTS ' + (_chatTTS ? 'ON' : 'OFF')); + if (typeof showToast === 'function') showToast('🔊 TTS ' + (_chatTTS ? 'ON' : 'OFF')); +} + +function chatSpeakText(text) { + if (!_chatTTS || typeof speechSynthesis === 'undefined') return; + speechSynthesis.cancel(); + var clean = text.replace(/```[\s\S]*?```/g, ' code block ').replace(/[*_#|`>]/g, '').replace(/\n+/g, '. ').trim(); + if (!clean) return; + function doSpeak(txt) { + var utter = new SpeechSynthesisUtterance(txt); + utter.rate = 1.0; + utter.pitch = 1.0; + var voice = _chatVoices.find(function(v) { return v.lang && v.lang.startsWith('en'); }) || (_chatVoices.length > 0 ? _chatVoices[0] : null); + if (voice) utter.voice = voice; + if (_chatVoices.length === 0) { + var spoken = false; + speechSynthesis.onvoiceschanged = function() { + if (spoken) return; spoken = true; + _chatVoices = speechSynthesis.getVoices() || []; + var v = _chatVoices.find(function(v) { return v.lang && v.lang.startsWith('en'); }) || _chatVoices[0]; + if (v) utter.voice = v; + speechSynthesis.cancel(); speechSynthesis.speak(utter); + speechSynthesis.onvoiceschanged = null; + }; + setTimeout(function() { + if (!spoken) { spoken = true; speechSynthesis.onvoiceschanged = null; speechSynthesis.cancel(); speechSynthesis.speak(utter); } + }, 2000); + } else { + speechSynthesis.speak(utter); + } + } + if (clean.length > 500) { + var chunks = clean.match(/.{1,500}/g); + for (var i = 0; i < chunks.length; i++) doSpeak(chunks[i]); + } else { + doSpeak(clean); + } +} + +function toggleChatMic() { + if (_chatMicRecording) { + stopChatRecording(); + } else { + startChatRecording(); + } +} + +function startChatRecording() { + if (!navigator.mediaDevices || !navigator.mediaDevices.getUserMedia) { + if (typeof showToast === 'function') showToast('🎤 Audio recording not supported'); + return; + } + _chatMicRecording = true; + _chatAudioChunks = []; + var btn = document.getElementById('chat-mic-btn'); + if (btn) { btn.textContent = '🔴'; btn.style.borderColor = 'var(--success-color)'; btn.style.color = 'var(--success-color)'; } + if (typeof addLog === 'function') addLog('🎤 Recording... (tap mic again to stop)'); + + navigator.mediaDevices.getUserMedia({ audio: true }) + .then(function(stream) { + var mimeType = MediaRecorder.isTypeSupported('audio/webm;codecs=opus') ? 'audio/webm;codecs=opus' + : MediaRecorder.isTypeSupported('audio/webm') ? 'audio/webm' : ''; + _chatMediaRecorder = new MediaRecorder(stream, mimeType ? { mimeType: mimeType } : {}); + _chatMediaRecorder.ondataavailable = function(e) { if (e.data.size > 0) _chatAudioChunks.push(e.data); }; + _chatMediaRecorder.onstop = function() { + stream.getTracks().forEach(function(t) { t.stop(); }); + transcribeChatAudio(); + }; + _chatMediaRecorder.start(); + _chatRecordingTimeout = setTimeout(function() { + if (_chatMediaRecorder && _chatMediaRecorder.state === 'recording') _chatMediaRecorder.stop(); + }, 10000); + }) + .catch(function(err) { + if (typeof showToast === 'function') showToast('🎤 Mic denied: ' + err.message); + _chatMicRecording = false; + var btn = document.getElementById('chat-mic-btn'); + if (btn) { btn.textContent = '🎤'; btn.style.borderColor = ''; btn.style.color = ''; } + }); +} + +function stopChatRecording() { + if (_chatMediaRecorder && _chatMediaRecorder.state === 'recording') { + _chatMediaRecorder.stop(); + clearTimeout(_chatRecordingTimeout); + } + _chatMicRecording = false; + var btn = document.getElementById('chat-mic-btn'); + if (btn) { btn.textContent = '🎤'; btn.style.borderColor = ''; btn.style.color = ''; } +} + +function transcribeChatAudio() { + var blob = new Blob(_chatAudioChunks, { type: _chatMediaRecorder ? _chatMediaRecorder.mimeType || 'audio/webm' : 'audio/webm' }); + if (blob.size < 100) { + if (typeof addLog === 'function') addLog('🎤 No audio detected'); + return; + } + if (typeof addLog === 'function') addLog('🎤 Transcribing...'); + var reader = new FileReader(); + reader.onload = async function() { + try { + var ctx = new (window.AudioContext || window.webkitAudioContext)(); + var audioBuffer = await ctx.decodeAudioData(reader.result); + var pcmData = chatAudioBufferToWav(audioBuffer); + var b64 = btoa(String.fromCharCode.apply(null, new Uint8Array(pcmData))); + var resp = await fetch(_chatSTTEndpoint, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ audio: b64, sample_rate: 16000 }) + }); + var data = await resp.json(); + var text = (data.text || '').trim(); + if (text) { + if (typeof addLog === 'function') addLog('🎤 Recognized: "' + text + '"'); + var input = document.getElementById('chatInput'); + if (input) { input.value = text; input.focus(); } + } else { + if (typeof addLog === 'function') addLog('🎤 No speech detected'); + } + } catch (err) { + if (typeof addLog === 'function') addLog('🎤 Transcription error: ' + err.message); + } + }; + reader.readAsArrayBuffer(blob); +} + +function chatAudioBufferToWav(audioBuffer) { + var targetSampleRate = 16000; + var src = audioBuffer.getChannelData(0); + var srcRate = audioBuffer.sampleRate; + var ratio = srcRate / targetSampleRate; + var newLen = Math.round(src.length / ratio); + var pcm = new Int16Array(newLen); + for (var i = 0; i < newLen; i++) { + var srcIdx = Math.round(i * ratio); + var sample = Math.max(-1, Math.min(1, src[Math.min(srcIdx, src.length - 1)])); + pcm[i] = sample < 0 ? sample * 0x8000 : sample * 0x7FFF; + } + var buffer = new ArrayBuffer(44 + pcm.byteLength); + var view = new DataView(buffer); + var writeStr = function(off, str) { for (var j = 0; j < str.length; j++) view.setUint8(off + j, str.charCodeAt(j)); }; + writeStr(0, 'RIFF'); view.setUint32(4, 36 + pcm.byteLength, true); writeStr(8, 'WAVE'); + writeStr(12, 'fmt '); view.setUint32(16, 16, true); view.setUint16(20, 1, true); view.setUint16(22, 1, true); + view.setUint32(24, targetSampleRate, true); view.setUint32(28, targetSampleRate * 2, true); + view.setUint16(32, 2, true); view.setUint16(34, 16, true); + writeStr(36, 'data'); view.setUint32(40, pcm.byteLength, true); + new Uint8Array(buffer, 44).set(new Uint8Array(pcm.buffer)); + return buffer; +} diff --git a/chat/chat-ui.html b/chat/chat-ui.html index 5b8e421..2f53a3a 100644 --- a/chat/chat-ui.html +++ b/chat/chat-ui.html @@ -5,6 +5,8 @@ 🤖 WebX11 AI
+ +