返回 CodeWhale
mod.rs
根目录 / crates / tui / src / commands / groups / core / mod.rs
1 //! Core command area: model/provider selection, help, navigation, and the
2 //! persistent RLM / sub-agent entry points.
3
4 #[cfg(all(test, feature = "long-running-tests"))]
5 mod acceptance;
6 mod advisor;
7 mod agent;
8 mod anchor;
9 mod clear;
10 mod constitution;
11 // This group dir intentionally has a `core.rs` child module with the same
12 // name. The module_inception allow is a permanent structure rationale, not
13 // migration scaffolding; see docs/architecture/command-dispatch.md.
14 #[allow(clippy::module_inception)]
15 mod core;
16 mod effort;
17 mod exit;
18 mod feedback;
19 mod fleet;
20 mod help;
21 mod hf;
22 mod home;
23 mod hooks;
24 mod hotbar;
25 mod lane;
26 mod links;
27 mod model;
28 mod modeldb;
29 mod models;
30 mod profile;
31 mod provider;
32 mod queue;
33 mod rlm;
34 mod setup;
35 mod stash;
36 mod subagents;
37 mod transcript;
38 mod translate;
39 mod turn;
40 pub mod util;
41 pub mod voice;
42 mod workflow;
43 mod workspace;
44
45 pub(in crate::commands) use self::core::reset_conversation_state;
46
47 use crate::commands::CommandResult;
48 use crate::commands::traits::{Command, CommandGroup, FunctionCommand, RegisterCommand};
49
50 pub struct CoreCommands;
51
52 impl CommandGroup for CoreCommands {
53 fn commands(&self) -> &'static [Box<dyn Command>] {
54 cached_command_list!(vec![
55 Box::new(FunctionCommand::new(
56 anchor::AnchorCmd::info(),
57 anchor::AnchorCmd::execute,
58 )),
59 Box::new(FunctionCommand::new(
60 advisor::AdvisorCmd::info(),
61 advisor::AdvisorCmd::execute,
62 )),
63 Box::new(FunctionCommand::new(
64 help::HelpCmd::info(),
65 help::HelpCmd::execute,
66 )),
67 Box::new(FunctionCommand::new(
68 clear::ClearCmd::info(),
69 clear::ClearCmd::execute,
70 )),
71 Box::new(FunctionCommand::new(
72 exit::ExitCmd::info(),
73 exit::ExitCmd::execute,
74 )),
75 Box::new(FunctionCommand::new(
76 model::ModelCmd::info(),
77 model::ModelCmd::execute,
78 )),
79 Box::new(FunctionCommand::new(
80 models::ModelsCmd::info(),
81 models::ModelsCmd::execute,
82 )),
83 Box::new(FunctionCommand::new(
84 modeldb::ModelDbCmd::info(),
85 modeldb::ModelDbCmd::execute,
86 )),
87 Box::new(FunctionCommand::new(
88 provider::ProviderCmd::info(),
89 provider::ProviderCmd::execute,
90 )),
91 Box::new(FunctionCommand::new(
92 queue::QueueCmd::info(),
93 queue::QueueCmd::execute,
94 )),
95 Box::new(FunctionCommand::new(
96 stash::StashCmd::info(),
97 stash::StashCmd::execute,
98 )),
99 Box::new(FunctionCommand::new(
100 hooks::HooksCmd::info(),
101 hooks::HooksCmd::execute,
102 )),
103 Box::new(FunctionCommand::new(
104 subagents::SubagentsCmd::info(),
105 subagents::SubagentsCmd::execute,
106 )),
107 Box::new(FunctionCommand::new(
108 fleet::FleetCmd::info(),
109 fleet::FleetCmd::execute,
110 )),
111 Box::new(FunctionCommand::new(
112 lane::LaneCmd::info(),
113 lane::LaneCmd::execute,
114 )),
115 Box::new(FunctionCommand::new(
116 workflow::WorkflowCmd::info(),
117 workflow::WorkflowCmd::execute,
118 )),
119 Box::new(FunctionCommand::new(
120 hotbar::HotbarCmd::info(),
121 hotbar::HotbarCmd::execute,
122 )),
123 Box::new(FunctionCommand::new(
124 setup::SetupCmd::info(),
125 setup::SetupCmd::execute,
126 )),
127 Box::new(FunctionCommand::new(
128 constitution::ConstitutionCmd::info(),
129 constitution::ConstitutionCmd::execute,
130 )),
131 Box::new(FunctionCommand::new(
132 agent::AgentCmd::info(),
133 agent::AgentCmd::execute,
134 )),
135 Box::new(FunctionCommand::new(
136 links::LinksCmd::info(),
137 links::LinksCmd::execute,
138 )),
139 Box::new(FunctionCommand::new(
140 transcript::TranscriptCmd::info(),
141 transcript::TranscriptCmd::execute,
142 )),
143 Box::new(FunctionCommand::new(
144 turn::TurnCmd::info(),
145 turn::TurnCmd::execute,
146 )),
147 Box::new(FunctionCommand::new(
148 feedback::FeedbackCmd::info(),
149 feedback::FeedbackCmd::execute,
150 )),
151 Box::new(FunctionCommand::new(hf::HfCmd::info(), hf::HfCmd::execute)),
152 Box::new(FunctionCommand::new(
153 home::HomeCmd::info(),
154 home::HomeCmd::execute,
155 )),
156 Box::new(FunctionCommand::new(
157 workspace::WorkspaceCmd::info(),
158 workspace::WorkspaceCmd::execute,
159 )),
160 Box::new(FunctionCommand::new(
161 profile::ProfileCmd::info(),
162 profile::ProfileCmd::execute,
163 )),
164 Box::new(FunctionCommand::new(
165 rlm::RlmCmd::info(),
166 rlm::RlmCmd::execute,
167 )),
168 Box::new(FunctionCommand::new(
169 translate::TranslateCmd::info(),
170 translate::TranslateCmd::execute,
171 )),
172 Box::new(FunctionCommand::new(
173 voice::VoiceCmd::info(),
174 voice::VoiceCmd::execute,
175 )),
176 Box::new(FunctionCommand::new(&effort::EFFORT_INFO, effort::effort,)),
177 Box::new(FunctionCommand::new(
178 voice::VoiceSendCmd::info(),
179 voice::VoiceSendCmd::execute,
180 )),
181 Box::new(FunctionCommand::new(
182 voice::VoiceControlCmd::info(),
183 voice::VoiceControlCmd::execute,
184 )),
185 ])
186 }
187 }
188
188 lines RUST