Compare commits
3 Commits
f18a7f9c30
...
a83aea86e3
Author | SHA1 | Date |
---|---|---|
projectmoon | a83aea86e3 | |
projectmoon | 70e7b82996 | |
projectmoon | 850c43c486 |
|
@ -6,10 +6,7 @@ use itertools::Itertools;
|
|||
|
||||
use crate::models::{
|
||||
coherence::{CoherenceFailure, SceneFix},
|
||||
world::{
|
||||
raw::ExitSeed,
|
||||
scenes::{root_scene_id, Exit, Scene},
|
||||
},
|
||||
world::scenes::{root_scene_id, Exit, Scene},
|
||||
Content, ContentContainer,
|
||||
};
|
||||
|
||||
|
@ -69,7 +66,7 @@ pub(super) fn check_scene_coherence<'a>(scene: &'a Scene) -> Vec<CoherenceFailur
|
|||
let duplicate_exits: Vec<_> = scene.exits.iter().filter(|e| e.name == exit.name).collect();
|
||||
|
||||
if duplicate_exits.len() > 1 && !is_duplicate_recorded(&failures, exit) {
|
||||
let failure = CoherenceFailure::DuplicateExits(duplicate_exits);
|
||||
failures.push(CoherenceFailure::DuplicateExits(duplicate_exits));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,10 +13,10 @@ use crate::models::world::raw::{
|
|||
use crate::models::world::scenes::{Exit, Scene, SceneStub, Stage};
|
||||
use std::rc::Rc;
|
||||
|
||||
fn find_exit_position(exits: &[Exit], exit: &Exit) -> Result<usize> {
|
||||
fn find_exit_position(exits: &[Exit], exit_to_find: &Exit) -> Result<usize> {
|
||||
let (pos, _) = exits
|
||||
.iter()
|
||||
.find_position(|&exit| exit == exit)
|
||||
.find_position(|&exit| exit == exit_to_find)
|
||||
.ok_or(anyhow!("cannot find exit"))?;
|
||||
|
||||
Ok(pos)
|
||||
|
@ -24,7 +24,8 @@ fn find_exit_position(exits: &[Exit], exit: &Exit) -> Result<usize> {
|
|||
|
||||
/// Intermediate level struct that is charged with creating 'raw'
|
||||
/// information via the LLM and doing basic coherence on it. Things
|
||||
/// like ID creation and management are done at a higher level.
|
||||
/// like ID creation, data management, and advanced coherence are done
|
||||
/// at a higher level.
|
||||
pub struct AiClient {
|
||||
parsing_convo: AiConversation,
|
||||
world_creation_convo: AiConversation,
|
||||
|
|
|
@ -10,7 +10,6 @@ use crate::models::world::scenes::{Exit, Scene, SceneStub, Stage};
|
|||
use crate::models::{new_uuid_string, Content, ContentContainer, ContentRelation};
|
||||
use anyhow::{bail, Result};
|
||||
use itertools::Itertools;
|
||||
use std::cell::RefCell;
|
||||
use std::rc::Rc;
|
||||
|
||||
mod coherence;
|
||||
|
|
Loading…
Reference in New Issue