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:
@@ -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);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user