MCPcopy Create free account
hub / github.com/SamuelSchmidgall/AgentLaboratory / parse_command

Method parse_command

papersolver.py:162–174  ·  view source on GitHub ↗
(self, *args)

Source from the content-addressed store, hash-verified

160 return False
161
162 def parse_command(self, *args) -> tuple:
163 cmd_str, latexlines = args[0], args[1]
164 success = True
165 try:
166 text = extract_prompt(cmd_str, "EDIT").split("\n")
167 if len(text) == 0: return False, (None, None, None, None)
168 lines_to_edit = text[0].split(" ")
169 if len(lines_to_edit) != 2: return False, (None, None, None, None)
170 lines_to_edit = [int(_) for _ in lines_to_edit]
171 if len(text[1:]) == 0: return False, (None, None, None, None)
172 return success, (lines_to_edit[0], lines_to_edit[1], latexlines, text[1:])
173 except Exception as e:
174 return False, (None, None, None, None)
175
176
177

Callers

nothing calls this directly

Calls 1

extract_promptFunction · 0.85

Tested by

no test coverage detected