updated AGENTS.md and pps site works again.

This commit is contained in:
Sebastian Moser
2026-10-14 01:50:08 +02:00
parent a7db7da9d2
commit 0b316ad54f
20 changed files with 1053 additions and 264 deletions

View File

@@ -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(())
})?;