astrocode-workflow 0.1.28 → 0.1.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -48,7 +48,7 @@ export function decideNextAction(db, config) {
|
|
|
48
48
|
}
|
|
49
49
|
function isInitialStory(db, storyKey) {
|
|
50
50
|
// Check if this story has no parent relations (is top-level)
|
|
51
|
-
const relations = db.prepare("SELECT COUNT(*) as count FROM story_relations WHERE
|
|
51
|
+
const relations = db.prepare("SELECT COUNT(*) as count FROM story_relations WHERE child_story_key=?").get(storyKey);
|
|
52
52
|
return relations.count === 0;
|
|
53
53
|
}
|
|
54
54
|
export function createRunForStory(db, config, storyKey) {
|
package/package.json
CHANGED
|
@@ -76,7 +76,7 @@ export function decideNextAction(db: SqliteDb, config: AstrocodeConfig): NextAct
|
|
|
76
76
|
|
|
77
77
|
function isInitialStory(db: SqliteDb, storyKey: string): boolean {
|
|
78
78
|
// Check if this story has no parent relations (is top-level)
|
|
79
|
-
const relations = db.prepare("SELECT COUNT(*) as count FROM story_relations WHERE
|
|
79
|
+
const relations = db.prepare("SELECT COUNT(*) as count FROM story_relations WHERE child_story_key=?").get(storyKey) as { count: number };
|
|
80
80
|
return relations.count === 0;
|
|
81
81
|
}
|
|
82
82
|
|