prediction: rewrite the prompting stack to create the ship computer as a second character, and let characters/agents operate autonomously with their own tasks and event queues

This commit is contained in:
2026-06-22 08:57:49 +02:00
parent 2d7153eaf7
commit 70ec40a880
21 changed files with 1091 additions and 563 deletions
+3 -2
View File
@@ -34,11 +34,11 @@ impl DataSource for BandcampSource {
type Args = BandcampQueryArgs;
type Error = ();
async fn synchronize(&mut self, _artifact: &mut Artifact) -> Result<Vec<Artifact>, Self::Error> {
async fn synchronize(&self, _artifact: &mut Artifact) -> Result<Vec<Artifact>, Self::Error> {
todo!()
}
async fn query(&mut self, args: &Self::Args) -> Result<Vec<Artifact>, Self::Error> {
async fn query(&self, args: &Self::Args) -> Result<Vec<Artifact>, Self::Error> {
log::debug!("Fetching artifacts from Bandcamp with {:?}", args);
let mut json_results = vec![];
if let Ok(results) = bandcamp::search(args.query.as_str()).await {
@@ -46,6 +46,7 @@ impl DataSource for BandcampSource {
log::debug!("Result: {:?}", result);
match result {
SearchResultItem::Artist(data) => {
// TODO: The artist and album detailed fetchers should also be separate args
let result = bandcamp::fetch_artist(data.artist_id).await.unwrap().into();
json_results.push(result);
},