import React, { useState, useEffect } from 'react'; import { ConfigManager } from '../../../core/config/ConfigManager'; const BehaviorSettings: React.FC = () => { const [chatboxDefaultOpen, setChatboxDefaultOpen] = useState(true); const [enableAudioCapture, setEnableAudioCapture] = useState(false); const configManager = ConfigManager.instance(); // Load configuration values on component mount useEffect(() => { const loadConfig = async () => { if (!configManager.getIsInitialized()) { await configManager.initialize(); } setChatboxDefaultOpen((configManager.get('chatbox.default_open') as boolean) ?? true); setEnableAudioCapture((configManager.get('audio.enable_audio_capture_for_screen_sharing') as boolean) ?? false); }; loadConfig(); }, [configManager]); // Save configuration when values change const handleChatboxDefaultOpenChange = async (value: string) => { const boolValue = value === 'yes'; setChatboxDefaultOpen(boolValue); await configManager.set('chatbox.default_open', boolValue); }; const handleEnableAudioCaptureChange = async (value: string) => { const boolValue = value === 'yes'; setEnableAudioCapture(boolValue); await configManager.set('audio.enable_audio_capture_for_screen_sharing', boolValue); }; return (

Behavior

Chat Box

Audio

Restart KGStudio (refresh the page) to take effect. Enable this option when KGStudio's audio cannot be captured during screen sharing in video calls (e.g., Zoom, Teams). This creates an additional audio stream that screen capture applications can detect.
It is important to make sure when screen sharing in Zoom, the "Share Sound" option is enabled.
); }; export default BehaviorSettings;