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