Skip to content

Commit 51587ce

Browse files
authored
Merge pull request #392 from dallay/feat/shared-human-output-formatter
Introduce shared human output formatter
2 parents c008f7c + dcaf855 commit 51587ce

4 files changed

Lines changed: 156 additions & 163 deletions

File tree

src/commands/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ pub mod doctor;
22
#[cfg(test)]
33
mod doctor_tests;
44
pub mod skill;
5-
mod skill_fmt;
65
pub mod status;
76
#[cfg(test)]
87
mod status_tests;

src/commands/skill.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::commands::skill_fmt::{self, HumanFormatter, LabelKind, OutputMode};
1+
use crate::output::{self, HumanFormatter, LabelKind, OutputMode};
22
use agentsync::skills::catalog::EmbeddedSkillCatalog;
33
use agentsync::skills::provider::{Provider, SkillsShProvider, resolve_catalog_install_source};
44
use agentsync::skills::registry;
@@ -32,7 +32,7 @@ fn detect_suggest_install_output_mode(
3232
clicolor: Option<&str>,
3333
term: Option<&str>,
3434
) -> SuggestInstallOutputMode {
35-
let base = skill_fmt::detect_output_mode(json, stdout_is_tty, no_color, clicolor, term);
35+
let base = output::detect_output_mode(json, stdout_is_tty, no_color, clicolor, term);
3636
match base {
3737
OutputMode::Json => SuggestInstallOutputMode::Json,
3838
OutputMode::Human { use_color } => {
@@ -538,7 +538,7 @@ pub fn run_update(args: SkillUpdateArgs, project_root: PathBuf) -> Result<()> {
538538
update_source_path,
539539
))
540540
};
541-
let mode = skill_fmt::output_mode(args.json);
541+
let mode = output::output_mode(args.json);
542542
match result {
543543
Ok(()) => {
544544
match mode {
@@ -840,7 +840,7 @@ pub fn run_install(args: SkillInstallArgs, project_root: PathBuf) -> Result<()>
840840
&source,
841841
&target_root,
842842
);
843-
let mode = skill_fmt::output_mode(args.json);
843+
let mode = output::output_mode(args.json);
844844
match result {
845845
Ok(()) => {
846846
match mode {
@@ -973,7 +973,7 @@ pub fn run_uninstall(args: SkillUninstallArgs, project_root: PathBuf) -> Result<
973973

974974
let result = agentsync::skills::uninstall::uninstall_skill(skill_id, &target_root);
975975

976-
let mode = skill_fmt::output_mode(args.json);
976+
let mode = output::output_mode(args.json);
977977
match result {
978978
Ok(()) => {
979979
match mode {

src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use std::path::PathBuf;
1010

1111
use agentsync::{Linker, SyncOptions, config::Config, gitignore, init};
1212
mod commands;
13+
mod output;
1314
use commands::doctor::run_doctor;
1415
use commands::skill::{SkillCommand, run_skill};
1516
use commands::status::{StatusArgs, run_status};

0 commit comments

Comments
 (0)