5#include "absl/strings/str_format.h"
14 : window_manager_(window_manager), session_id_(session_id) {}
21 std::function<
void(
const std::string&)> switch_callback)
22 : switch_callback_(std::move(switch_callback)) {}
29 std::function<
void(
const std::string&)> open_callback)
30 : open_callback_(std::move(open_callback)) {}
37 : session_id_(session_id) {}
45 : window_manager_(window_manager), session_id_(session_id) {}
54 : window_manager_(window_manager),
55 user_settings_(user_settings),
56 session_id_(session_id) {}
66 "Clear the custom sidebar order and revert to defaults",
75 "Un-hide every sidebar category",
84 for (
const auto& cat : categories) {
87 std::string pin_name =
88 absl::StrFormat(
"Sidebar: Toggle Pin: %s", cat);
89 std::string pin_desc =
90 absl::StrFormat(
"Pin or unpin %s at the top of the sidebar", cat);
91 std::string captured_cat_pin = cat;
94 [
this, captured_cat_pin]() {
98 if (pinned.count(captured_cat_pin)) {
99 pinned.erase(captured_cat_pin);
101 pinned.insert(captured_cat_pin);
106 std::string hide_name =
107 absl::StrFormat(
"Sidebar: Toggle Visibility: %s", cat);
108 std::string hide_desc =
109 absl::StrFormat(
"Show or hide %s in the sidebar", cat);
110 std::string captured_cat_hide = cat;
113 [
this, captured_cat_hide]() {
117 if (hidden.count(captured_cat_hide)) {
118 hidden.erase(captured_cat_hide);
120 hidden.insert(captured_cat_hide);
128 : callbacks_(std::move(callbacks)) {}
void RegisterDungeonRoomCommands(size_t session_id)
Register dungeon room navigation commands.
void RegisterWelcomeCommands(const RecentProjectsModel *model, const std::vector< std::string > &template_names, std::function< void(const std::string &)> remove_callback, std::function< void(const std::string &)> toggle_pin_callback, std::function< void()> undo_remove_callback, std::function< void()> clear_recents_callback, std::function< void(const std::string &)> create_from_template_callback, std::function< void()> dismiss_welcome_callback, std::function< void()> show_welcome_callback)
Expose welcome-screen actions through the command palette.
void AddCommand(const std::string &name, const std::string &category, const std::string &description, const std::string &shortcut, std::function< void()> callback)
void RegisterPanelCommands(WorkspaceWindowManager *window_manager, size_t session_id)
Register all window toggle commands from WorkspaceWindowManager.
void RegisterWorkflowCommands(WorkspaceWindowManager *window_manager, size_t session_id)
Register hack workflow commands from workflow-aware panels/actions.
void RegisterEditorCommands(std::function< void(const std::string &)> switch_callback)
Register all editor switch commands.
void RegisterRecentFilesCommands(std::function< void(const std::string &)> open_callback)
Register commands to open recent files.
void Provide(CommandPalette *palette) override
Populate palette with this source's commands.
DungeonRoomCommandsProvider(size_t session_id)
void Provide(CommandPalette *palette) override
Populate palette with this source's commands.
EditorCommandsProvider(std::function< void(const std::string &)> switch_callback)
std::function< void(const std::string &) switch_callback_)
WorkspaceWindowManager * window_manager_
void Provide(CommandPalette *palette) override
Populate palette with this source's commands.
PanelCommandsProvider(WorkspaceWindowManager *window_manager, size_t session_id)
void Provide(CommandPalette *palette) override
Populate palette with this source's commands.
std::function< void(const std::string &) open_callback_)
RecentFilesCommandsProvider(std::function< void(const std::string &)> open_callback)
Manages user preferences and settings persistence.
void Provide(CommandPalette *palette) override
Populate palette with this source's commands.
WelcomeCommandsProvider(Callbacks callbacks)
WorkspaceWindowManager * window_manager_
void Provide(CommandPalette *palette) override
Populate palette with this source's commands.
WorkflowCommandsProvider(WorkspaceWindowManager *window_manager, size_t session_id)
Central registry for all editor cards with session awareness and dependency injection.
static constexpr const char * kDashboardCategory
std::vector< std::string > GetAllCategories(size_t session_id) const
static constexpr const char * kView
std::unordered_set< std::string > sidebar_hidden
std::function< void()> clear_recents
std::function< void(const std::string &) toggle_pin)
std::vector< std::string > template_names
std::function< void()> undo_remove
std::function< void(const std::string &) remove)
std::function< void()> dismiss_welcome
std::function< void()> show_welcome
std::function< void(const std::string &) create_from_template)
const RecentProjectsModel * model