feat: enhance chat functionality with web context debugging and improved message handling

- Added state management for web context and sources to improve debugging capabilities in chat.
- Implemented a debug view for displaying extracted context and sources used in chat responses.
- Refactored message handling to incorporate web context into user messages, enhancing response accuracy.
- Updated UI components to support new debugging features and improve user interaction.
This commit is contained in:
Evandro Fonseca Junior committed 2025-11-20 05:34:44 -03:00
1 parent 3d91678109
commit 5c1a859925
3 files changed
+194 -56

No files matched your search

+26 -26
View File
@@ -1307,40 +1307,40 @@ fn force_kill_browser() -> Result<u32, String> {
}
// Processo identificado como headless - pode matar com segurança
#[cfg(target_os = "windows")]
{
use std::process::Command;
match Command::new("taskkill")
.args(&["/F", "/PID", &pid.to_string()])
.output()
#[cfg(target_os = "windows")]
{
Ok(output) => {
if output.status.success() {
killed_count += 1;
use std::process::Command;
match Command::new("taskkill")
.args(&["/F", "/PID", &pid.to_string()])
.output()
{
Ok(output) => {
if output.status.success() {
killed_count += 1;
log::info!("Processo Chrome headless encerrado: PID {} ({})", pid, name);
}
}
Err(e) => {
log::warn!("Erro ao encerrar processo {}: {}", pid, e);
}
}
Err(e) => {
log::warn!("Erro ao encerrar processo {}: {}", pid, e);
}
}
}
#[cfg(not(target_os = "windows"))]
{
use std::process::Command;
match Command::new("kill")
.args(&["-9", &pid.to_string()])
.output()
#[cfg(not(target_os = "windows"))]
{
Ok(output) => {
if output.status.success() {
killed_count += 1;
use std::process::Command;
match Command::new("kill")
.args(&["-9", &pid.to_string()])
.output()
{
Ok(output) => {
if output.status.success() {
killed_count += 1;
log::info!("Processo Chrome headless encerrado: PID {} ({})", pid, name);
}
}
}
Err(e) => {
log::warn!("Erro ao encerrar processo {}: {}", pid, e);
Err(e) => {
log::warn!("Erro ao encerrar processo {}: {}", pid, e);
}
}
}