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