Tachi67 commited on
Commit
509b1d2
·
1 Parent(s): 2c06037

Upload 9 files

Browse files
Files changed (2) hide show
  1. CodeWriterFlow.py +7 -0
  2. CodeWriterFlow.yaml +1 -0
CodeWriterFlow.py CHANGED
@@ -31,6 +31,13 @@ class CodeWriterFlow(ContentWriterFlow):
31
  "status": "finished"
32
  }
33
  elif command == "manual_finish":
 
 
 
 
 
 
 
34
  return {
35
  "EARLY_EXIT": True,
36
  "code": "no code was generated",
 
31
  "status": "finished"
32
  }
33
  elif command == "manual_finish":
34
+ # ~~~ delete the temp code file ~~~
35
+ keys_to_fetch_from_state = ["temp_code_file_location"]
36
+ fetched_state = self._fetch_state_attributes_by_keys(keys=keys_to_fetch_from_state)
37
+ temp_code_file_location = fetched_state["temp_code_file_location"]
38
+ if os.path.exists(temp_code_file_location):
39
+ os.remove(temp_code_file_location)
40
+ # ~~~ return the manual quit status ~~~
41
  return {
42
  "EARLY_EXIT": True,
43
  "code": "no code was generated",
CodeWriterFlow.yaml CHANGED
@@ -6,6 +6,7 @@ _target_: Tachi67.CodeWriterFlowModule.CodeWriterFlow.instantiate_from_default_c
6
  output_interface:
7
  - "code"
8
  - "status"
 
9
 
10
  ### Subflows specification
11
  subflows_config:
 
6
  output_interface:
7
  - "code"
8
  - "status"
9
+ - "summary"
10
 
11
  ### Subflows specification
12
  subflows_config: