createEmptyState function
Creates an empty state map inferred from agent instruction placeholders.
Keys already provided in initializedStates are excluded from the result.
Implementation
Map<String, Object?> createEmptyState(
BaseAgent agent, {
Map<String, Object?>? initializedStates,
}) {
final Map<String, Object?> nonInitialized = <String, Object?>{};
_createEmptyState(agent, nonInitialized);
for (final String key in initializedStates?.keys ?? const <String>[]) {
nonInitialized.remove(key);
}
return nonInitialized;
}