We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8d65c0c commit 64c012cCopy full SHA for 64c012c
agents/tools/command_executor.py
@@ -0,0 +1,17 @@
1
+# tools/command_executor.py
2
+
3
+def execute_commands(commands, db, config):
4
+ for cmd in commands:
5
+ print(f"🛠️ Выполнение команды: {cmd['type']} ({cmd.get('cmd_id')})")
6
+ try:
7
+ if cmd['type'] == 'shell':
8
+ run_shell_command(cmd, db)
9
+ elif cmd['type'] == 'diary_entry':
10
+ db.write_entry(cmd['args']['text'], tags=["diary"])
11
+ elif cmd['type'] == 'graph_add':
12
+ db.add_link_or_concept(cmd['args'])
13
+ elif cmd['type'] == 'llm_memory_add':
14
+ db.add_llm_memory(cmd['args'])
15
+ # ... остальные команды
16
+ except Exception as e:
17
+ db.log_error(cmd['cmd_id'], str(e))
0 commit comments