feat(paradizweb): generate preliminary booking doc and return to web chat
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* Plugin Name: Paradiz Web Chat
|
||||
* Description: Чат-плагин для сайта vparadize.ru, который отправляет вопросы в изолированного агента OpenClaw paradizweb.
|
||||
* Version: 1.0.7
|
||||
* Version: 1.0.8
|
||||
* Author: EVA
|
||||
*/
|
||||
|
||||
@@ -57,7 +57,7 @@ class ParadizWebChat {
|
||||
}
|
||||
|
||||
public function enqueue_assets() {
|
||||
wp_register_script('paradiz-web-chat', plugins_url('chat.js', __FILE__), [], '1.0.7', true);
|
||||
wp_register_script('paradiz-web-chat', plugins_url('chat.js', __FILE__), [], '1.0.8', true);
|
||||
wp_localize_script('paradiz-web-chat', 'ParadizWebChatCfg', [
|
||||
'ajaxUrl' => admin_url('admin-ajax.php'),
|
||||
'nonce' => wp_create_nonce('paradiz_web_chat_nonce')
|
||||
@@ -195,7 +195,11 @@ class ParadizWebChat {
|
||||
wp_send_json_error(['message' => $body['error'] ?? 'Ошибка upstream']);
|
||||
}
|
||||
|
||||
wp_send_json_success(['answer' => $body['answer'] ?? '']);
|
||||
wp_send_json_success([
|
||||
'answer' => $body['answer'] ?? '',
|
||||
'booking_doc_name' => $body['booking_doc_name'] ?? '',
|
||||
'booking_doc_base64' => $body['booking_doc_base64'] ?? ''
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user