mirror of
https://github.com/myronblair/jarvis
synced 2026-06-30 17:50:23 -05:00
Fix chat URL routing and agent.php fact_type column error
- sendMessage() was fetching /api.php?action=chat which bypasses the /api/* rewrite rule; api.php parsed endpoint as "api.php" → 404. Fixed to /api/chat so the rewrite routes it correctly to chat.php. - agent.php HA entity map INSERT used non-existent fact_type column, causing PDOException on every agent heartbeat. Fixed to use the correct (category, fact_key, fact_value) columns. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -184,7 +184,7 @@ switch ($agentAction) {
|
||||
];
|
||||
}
|
||||
JarvisDB::query(
|
||||
'INSERT INTO kb_facts (fact_key, fact_value, fact_type) VALUES ("ha/entity_map", ?, "json")
|
||||
'INSERT INTO kb_facts (category, fact_key, fact_value) VALUES ("ha_entities", "ha/entity_map", ?)
|
||||
ON DUPLICATE KEY UPDATE fact_value=VALUES(fact_value), updated_at=NOW()',
|
||||
[json_encode($entityMap)]
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user