aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/infini/generator.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/infini/generator.py b/src/infini/generator.py
index 81a6ab14..e1386c6c 100644
--- a/src/infini/generator.py
+++ b/src/infini/generator.py
@@ -10,8 +10,9 @@ class Generator:
def output(self, output: Output) -> str:
assert output.type != "workflow", "Workflow 事件无法产出文本"
- template = self.match(output)
- return template.render(output.variables)
+ variables = self.global_variables.copy()
+ variables.update(output.variables)
+ return self.match(output).render(variables)
def match(self, output: Output) -> Template:
if context := self.events.get(output.name):