mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:32:32 +00:00
feat(tui/skills): add /skills slash command
This commit is contained in:
@@ -2365,6 +2365,11 @@ impl App<'_> {
|
||||
widget.handle_prompts_command(command_args.as_str());
|
||||
}
|
||||
}
|
||||
SlashCommand::Skills => {
|
||||
if let AppState::Chat { widget } = &mut self.app_state {
|
||||
widget.handle_skills_command(command_args.as_str());
|
||||
}
|
||||
}
|
||||
SlashCommand::Perf => {
|
||||
if let AppState::Chat { widget } = &mut self.app_state {
|
||||
widget.handle_perf_command(command_args);
|
||||
|
||||
@@ -15210,6 +15210,18 @@ impl ChatWidget<'_> {
|
||||
self.show_settings_overlay(Some(SettingsSection::Prompts));
|
||||
}
|
||||
|
||||
pub(crate) fn handle_skills_command(&mut self, args: &str) {
|
||||
if !args.trim().is_empty() {
|
||||
self.history_push_plain_state(history_cell::new_error_event(
|
||||
"Usage: /skills".to_string(),
|
||||
));
|
||||
return;
|
||||
}
|
||||
|
||||
self.submit_op(Op::ListSkills);
|
||||
self.show_settings_overlay(Some(SettingsSection::Skills));
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub(crate) fn add_agents_output(&mut self) {
|
||||
use ratatui::text::Line;
|
||||
|
||||
@@ -2177,9 +2177,9 @@ fn popular_commands_lines(_latest_version: Option<&str>) -> Vec<Line<'static>> {
|
||||
.style(Style::default().add_modifier(Modifier::DIM)),
|
||||
]));
|
||||
lines.push(Line::from(vec![
|
||||
Span::styled("/prompts", Style::default().fg(crate::colors::primary())),
|
||||
Span::styled("/skills", Style::default().fg(crate::colors::primary())),
|
||||
Span::from(" - "),
|
||||
Span::from(SlashCommand::Prompts.description())
|
||||
Span::from(SlashCommand::Skills.description())
|
||||
.style(Style::default().add_modifier(Modifier::DIM)),
|
||||
Span::styled(
|
||||
" NEW",
|
||||
@@ -5963,6 +5963,7 @@ fn is_title_line(line: &Line) -> bool {
|
||||
| "/diff"
|
||||
| "/status"
|
||||
| "/prompts"
|
||||
| "/skills"
|
||||
| "reasoning effort"
|
||||
| "error"
|
||||
) || text.starts_with("⚡")
|
||||
|
||||
@@ -72,6 +72,7 @@ pub enum SlashCommand {
|
||||
Reasoning,
|
||||
Verbosity,
|
||||
Prompts,
|
||||
Skills,
|
||||
Perf,
|
||||
Demo,
|
||||
Agents,
|
||||
@@ -122,6 +123,7 @@ impl SlashCommand {
|
||||
SlashCommand::Theme => "customize the app theme",
|
||||
SlashCommand::Settings => "manage all settings in one place",
|
||||
SlashCommand::Prompts => "manage custom prompts",
|
||||
SlashCommand::Skills => "manage skills",
|
||||
SlashCommand::Model => "choose your default model",
|
||||
SlashCommand::Agents => "configure agents",
|
||||
SlashCommand::Auto => "work autonomously on long tasks with Auto Drive",
|
||||
|
||||
@@ -21,8 +21,8 @@ Notes
|
||||
- `/logout`: log out of Code.
|
||||
- `/login`: manage Code sign-ins (select, add, or disconnect accounts).
|
||||
- `/settings [section]`: open the settings panel. Optional section argument
|
||||
jumps directly to `model`, `theme`, `agents`, `auto`, `review`, `validation`,
|
||||
`limits`, `chrome`, `mcp`, or `notifications`.
|
||||
jumps directly to `model`, `theme`, `agents`, `skills`, `auto`, `review`,
|
||||
`validation`, `limits`, `chrome`, `mcp`, or `notifications`.
|
||||
|
||||
## Workspace & Git
|
||||
|
||||
@@ -59,7 +59,8 @@ Notes
|
||||
- `/verbosity (high|medium|low)`: change text verbosity.
|
||||
- `/model`: choose your default model.
|
||||
- `/reasoning (minimal|low|medium|high)`: change reasoning effort.
|
||||
- `/prompts`: show example prompts.
|
||||
- `/prompts`: manage custom prompts.
|
||||
- `/skills`: manage skills.
|
||||
- `/status`: show current session configuration and token usage.
|
||||
- `/limits`: adjust session limits and visualize hourly and weekly rate-limit
|
||||
usage.
|
||||
|
||||
Reference in New Issue
Block a user