chore: auto-commit (11 archivos)
- CMakeLists.txt - app.md - main.cpp - panels.cpp - appicon.ico - autoextract_panel.cpp - picker_state.cpp - picker_state.h - py_subprocess.cpp - py_subprocess.h - ... Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,8 @@ void render_browsers_panel(bool* p_open);
|
||||
void render_tabs_panel(bool* p_open);
|
||||
void render_tab_detail_panel(bool* p_open);
|
||||
void render_network_panel(bool* p_open);
|
||||
void render_autoextract_panel(bool* p_open);
|
||||
void render_recipes_panel(bool* p_open);
|
||||
|
||||
// ---------- Visibilidad de paneles -----------------------------------------
|
||||
bool show_browsers = true;
|
||||
@@ -35,14 +37,18 @@ bool show_tabs = true;
|
||||
bool show_tab_detail = false;
|
||||
bool show_network = false;
|
||||
bool show_agent = false;
|
||||
bool show_autoextract = false;
|
||||
bool show_recipes = false;
|
||||
|
||||
namespace {
|
||||
constexpr fn_ui::PanelToggle k_panels[] = {
|
||||
{"Browsers", "Ctrl+1", &show_browsers},
|
||||
{"Tabs", "Ctrl+2", &show_tabs},
|
||||
{"Tab Detail", "Ctrl+3", &show_tab_detail},
|
||||
{"Network", "Ctrl+4", &show_network},
|
||||
{"Agent", "Ctrl+5", &show_agent},
|
||||
{"Browsers", "Ctrl+1", &show_browsers},
|
||||
{"Tabs", "Ctrl+2", &show_tabs},
|
||||
{"Tab Detail", "Ctrl+3", &show_tab_detail},
|
||||
{"Network", "Ctrl+4", &show_network},
|
||||
{"Agent", "Ctrl+5", &show_agent},
|
||||
{"AutoExtract", "Ctrl+6", &show_autoextract},
|
||||
{"Recipes", "Ctrl+7", &show_recipes},
|
||||
};
|
||||
} // anon
|
||||
|
||||
@@ -118,14 +124,17 @@ void extra_del(const std::string& name) {
|
||||
// ---------- API publica para tests + main ----------------------------------
|
||||
|
||||
std::string capture_panel_state() {
|
||||
char buf[256];
|
||||
char buf[384];
|
||||
std::snprintf(buf, sizeof(buf),
|
||||
"{\"browsers\":%d,\"tabs\":%d,\"tab_detail\":%d,\"network\":%d,\"agent\":%d}",
|
||||
"{\"browsers\":%d,\"tabs\":%d,\"tab_detail\":%d,\"network\":%d,\"agent\":%d,"
|
||||
"\"autoextract\":%d,\"recipes\":%d}",
|
||||
show_browsers ? 1 : 0,
|
||||
show_tabs ? 1 : 0,
|
||||
show_tab_detail ? 1 : 0,
|
||||
show_network ? 1 : 0,
|
||||
show_agent ? 1 : 0);
|
||||
show_agent ? 1 : 0,
|
||||
show_autoextract ? 1 : 0,
|
||||
show_recipes ? 1 : 0);
|
||||
return buf;
|
||||
}
|
||||
|
||||
@@ -138,16 +147,18 @@ void apply_panel_state(const std::string& json) {
|
||||
if (p >= json.size()) return def;
|
||||
return json[p] == '1' || (json.compare(p, 4, "true") == 0);
|
||||
};
|
||||
show_browsers = pull("browsers", true);
|
||||
show_tabs = pull("tabs", true);
|
||||
show_tab_detail = pull("tab_detail", true);
|
||||
show_network = pull("network", true);
|
||||
show_agent = pull("agent", false);
|
||||
show_browsers = pull("browsers", true);
|
||||
show_tabs = pull("tabs", true);
|
||||
show_tab_detail = pull("tab_detail", true);
|
||||
show_network = pull("network", true);
|
||||
show_agent = pull("agent", false);
|
||||
show_autoextract = pull("autoextract", false);
|
||||
show_recipes = pull("recipes", false);
|
||||
}
|
||||
|
||||
void open_all_panels() {
|
||||
show_browsers = show_tabs = show_tab_detail = show_network = true;
|
||||
// agent es opt-in: ni save/apply ni reset lo abren por defecto.
|
||||
// agent / autoextract / recipes son opt-in: no se reabren con Reset.
|
||||
}
|
||||
|
||||
void setup_layouts(fn::AppConfig& cfg) {
|
||||
@@ -291,11 +302,13 @@ void teardown_layouts() {
|
||||
// — no llamamos DockSpaceOverViewport aqui para no duplicar.
|
||||
void render() {
|
||||
using namespace navegator;
|
||||
if (show_browsers) render_browsers_panel(&show_browsers);
|
||||
if (show_tabs) render_tabs_panel(&show_tabs);
|
||||
if (show_tab_detail) render_tab_detail_panel(&show_tab_detail);
|
||||
if (show_network) render_network_panel(&show_network);
|
||||
if (show_agent) app_agent::chat_render(&show_agent);
|
||||
if (show_browsers) render_browsers_panel(&show_browsers);
|
||||
if (show_tabs) render_tabs_panel(&show_tabs);
|
||||
if (show_tab_detail) render_tab_detail_panel(&show_tab_detail);
|
||||
if (show_network) render_network_panel(&show_network);
|
||||
if (show_agent) app_agent::chat_render(&show_agent);
|
||||
if (show_autoextract) render_autoextract_panel(&show_autoextract);
|
||||
if (show_recipes) render_recipes_panel(&show_recipes);
|
||||
}
|
||||
|
||||
#ifndef FN_TEST_BUILD
|
||||
|
||||
Reference in New Issue
Block a user