Skip to content

Commit 6be335a

Browse files
committed
fix: routine discovery agent issues
1 parent 6bfa36c commit 6be335a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/routine_discovery/agent.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -418,13 +418,13 @@ def resolve_variables(self, extracted_variables: ExtractedVariableResponse) -> l
418418
storage_sources = self.context_manager.scan_storage_for_value(
419419
value=value
420420
)
421-
storage_sources.extend(storage_sources)
421+
storage_objects.extend(storage_sources)
422422

423-
if len(storage_sources) > 0:
424-
print(f"Found {len(storage_sources)} storage sources that contain the value")
423+
if len(storage_objects) > 0:
424+
print(f"Found {len(storage_objects)} storage sources that contain the value")
425425

426426
# get the transaction ids that contain the value and are before the latest timestamp
427-
transaction_ids = {}
427+
transaction_ids = []
428428
for value in variable.values_to_scan_for:
429429
transaction_ids.extend(self.context_manager.scan_transaction_responses(
430430
value=value, max_timestamp=max_timestamp
@@ -605,7 +605,7 @@ def productionize_routine(self, routine: Routine) -> Routine:
605605
f"and the surrounding quotes are removed, so \\\"{{{{item_id}}}}\\\" with value 42 becomes just 42 (valid JSON number, not string). "
606606
f"Example: \\\"{{{{total_price}}}}\\\" with value 29.99 → becomes 29.99 (quotes removed, valid JSON number). "
607607
f"Example: \\\"{{{{optional_data}}}}\\\" with null → becomes null (quotes removed, valid JSON null). "
608-
"""Placeholders will be resolved using this: param_pattern = r'(?:"|\\")\{\{([^}"]*)\}\}(?:"|\\")'"""
608+
"""Placeholders will be resolved using this: param_pattern = r'(?:"|\\\\")\\{\\{([^}"]*)\\}\\}(?:"|\\\\")'"""
609609
f"The resulting JSON MUST be valid and parseable after all placeholder replacements are done."
610610
)
611611
self._add_to_message_history("user", message)

0 commit comments

Comments
 (0)