fix: stabilize rpg creation entry and opening cg
This commit is contained in:
@@ -96,6 +96,14 @@ pub fn resolve_creation_entry_route_id(path: &str) -> Option<&'static str> {
|
||||
if normalized.starts_with("/api/runtime/big-fish") {
|
||||
return Some("big-fish");
|
||||
}
|
||||
if normalized.starts_with("/api/runtime/custom-world")
|
||||
|| normalized.starts_with("/api/runtime/custom-world-library")
|
||||
|| normalized.starts_with("/api/runtime/custom-world-gallery")
|
||||
|| normalized.starts_with("/api/runtime/chat")
|
||||
|| normalized.starts_with("/api/story")
|
||||
{
|
||||
return Some("rpg");
|
||||
}
|
||||
if normalized.starts_with("/api/runtime/visual-novel") {
|
||||
return Some("visual-novel");
|
||||
}
|
||||
@@ -161,6 +169,26 @@ mod tests {
|
||||
resolve_creation_entry_route_id("/api/creation/visual-novel/sessions"),
|
||||
Some("visual-novel"),
|
||||
);
|
||||
assert_eq!(
|
||||
resolve_creation_entry_route_id("/api/runtime/custom-world/agent/sessions"),
|
||||
Some("rpg"),
|
||||
);
|
||||
assert_eq!(
|
||||
resolve_creation_entry_route_id("/api/runtime/custom-world-library/profile-1"),
|
||||
Some("rpg"),
|
||||
);
|
||||
assert_eq!(
|
||||
resolve_creation_entry_route_id("/api/runtime/custom-world-gallery/user-1/profile-1"),
|
||||
Some("rpg"),
|
||||
);
|
||||
assert_eq!(
|
||||
resolve_creation_entry_route_id("/api/story/sessions/runtime"),
|
||||
Some("rpg"),
|
||||
);
|
||||
assert_eq!(
|
||||
resolve_creation_entry_route_id("/api/runtime/chat/npc/turn/stream"),
|
||||
Some("rpg"),
|
||||
);
|
||||
assert_eq!(
|
||||
resolve_creation_entry_route_id("/api/runtime/bark-battle/works/work-1/config"),
|
||||
Some("bark-battle"),
|
||||
|
||||
Reference in New Issue
Block a user