updated AGENTS.md and pps site works again.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
|
||||
use mize::*;
|
||||
pub mod timetrack;
|
||||
use clap::Command;
|
||||
|
||||
pub fn part_sci(mize: &mut Mize) -> MizeResult<()> {
|
||||
part_add_thought(mize)?;
|
||||
@@ -9,20 +10,20 @@ pub fn part_sci(mize: &mut Mize) -> MizeResult<()> {
|
||||
}
|
||||
|
||||
pub fn part_add_thought(mize: &mut Mize) -> MizeResult<()> {
|
||||
use marts::generated::spacetime::add_thought;
|
||||
let mut cli = mize.get_part_native::<marts::CliPart>("cli")?;
|
||||
use crate::generated::spacetime::add_thought;
|
||||
let mut cli = mize.get_part_native::<crate::CliPart>("cli")?;
|
||||
cli.set_command("sci");
|
||||
cli.subcommand(Command::new("inputThought").alias("ti"), |matches, mut mize| {
|
||||
cli.subcommand(Command::new("inputThought").alias("ti"), |_matches, mut mize| {
|
||||
|
||||
let tmp_file = std::env::temp_dir().join(format!(
|
||||
"sc2-input-thought-{}.txt",
|
||||
chrono::Utc::now().timestamp()
|
||||
));
|
||||
marts::cli_spawn(format!("nvim {}", tmp_file.display()))?;
|
||||
crate::cli_spawn(&mut mize, format!("nvim {}", tmp_file.display()))?;
|
||||
let new_file_content = std::fs::read_to_string(&tmp_file)
|
||||
.map_err(|e| mize_err!("Failed to read temp file: {}", e))?;
|
||||
let _ = std::fs::remove_file(&tmp_file);
|
||||
let spacetime = mize.get_part_native::<marts::SpacetimePart>("spacetime")?;
|
||||
let spacetime = mize.get_part_native::<crate::SpacetimePart>("spacetime")?;
|
||||
spacetime.con().reducers.add_thought(new_file_content)?;
|
||||
Ok(())
|
||||
})?;
|
||||
|
||||
Reference in New Issue
Block a user