This commit is contained in:
2026-03-01 15:36:48 +09:00
parent c5aa286b89
commit 21ff32864c
7 changed files with 405 additions and 0 deletions

View File

@@ -195,6 +195,12 @@ enum Commands {
command: PdsCommands,
},
/// GPT core/memory commands
Gpt {
#[command(subcommand)]
command: GptCommands,
},
/// Bot commands
#[command(alias = "b")]
Bot {
@@ -240,6 +246,30 @@ enum BotCommands {
},
}
#[derive(Subcommand)]
enum GptCommands {
/// Show core record (AI identity/personality)
Core {
/// Download to local content directory
#[arg(short, long)]
download: bool,
},
/// Show latest memory record
Memory {
/// Download to local content directory
#[arg(short, long)]
download: bool,
/// List all memory versions
#[arg(short, long)]
list: bool,
},
/// Push core/memory records to PDS
Push {
/// Collection to push (core or memory)
collection: String,
},
}
#[derive(Subcommand)]
enum PdsCommands {
/// Check PDS versions
@@ -344,6 +374,23 @@ async fn main() -> Result<()> {
}
}
}
Commands::Gpt { command } => {
match command {
GptCommands::Core { download } => {
commands::gpt::get_core(download).await?;
}
GptCommands::Memory { download, list } => {
if list {
commands::gpt::list_memory().await?;
} else {
commands::gpt::get_memory(download).await?;
}
}
GptCommands::Push { collection } => {
commands::gpt::push(&collection).await?;
}
}
}
}
Ok(())