feat: plan deterministic generated conversations

This commit is contained in:
Rijad Zuzo
2026-08-12 20:32:53 +02:00
parent 4b58c534d0
commit 41b37a4962
28 changed files with 1694 additions and 0 deletions
@@ -0,0 +1,56 @@
class_name ConversationSelectionResult
extends RefCounted
var _accepted := false
var _reason_code: StringName
var _expected_revision := -1
var _current_revision := -1
var _selected_option_id: StringName
var _turn: ConversationTurn
var _reason_trace: Array[StringName] = []
func _init(
accepted: bool = false,
reason_code: StringName = &"",
expected_revision: int = -1,
current_revision: int = -1,
selected_option_id: StringName = &"",
turn: ConversationTurn = null,
reason_trace: Array[StringName] = []
) -> void:
_accepted = accepted
_reason_code = reason_code
_expected_revision = expected_revision
_current_revision = current_revision
_selected_option_id = selected_option_id
_turn = turn.copy() if turn != null else null
_reason_trace = reason_trace.duplicate()
func was_accepted() -> bool:
return _accepted
func get_reason_code() -> StringName:
return _reason_code
func get_expected_revision() -> int:
return _expected_revision
func get_current_revision() -> int:
return _current_revision
func get_selected_option_id() -> StringName:
return _selected_option_id
func get_turn() -> ConversationTurn:
return _turn.copy() if _turn != null else null
func get_reason_trace() -> Array[StringName]:
return _reason_trace.duplicate()