mirror of
https://github.com/WenPai-org/wpmind.git
synced 2025-08-06 13:47:16 +08:00
changed popup and work with contexts
add possibility to provide current page context and selected blocks context simplified popup by removing suggestions on initial load simplified popup footer styles and
This commit is contained in:
parent
f054220647
commit
e4df5e290e
20 changed files with 459 additions and 239 deletions
|
@ -115,10 +115,12 @@ class Mind_Rest extends WP_REST_Controller {
|
|||
* @return mixed
|
||||
*/
|
||||
public function request_ai( WP_REST_Request $req ) {
|
||||
$request = $req->get_param( 'request' ) ?? '';
|
||||
$context = $req->get_param( 'context' ) ?? '';
|
||||
$request = $req->get_param( 'request' ) ?? '';
|
||||
$selected_blocks = $req->get_param( 'selected_blocks' ) ?? '';
|
||||
$page_blocks = $req->get_param( 'page_blocks' ) ?? '';
|
||||
$page_context = $req->get_param( 'page_context' ) ?? '';
|
||||
|
||||
Mind_AI_API::instance()->request( $request, $context );
|
||||
Mind_AI_API::instance()->request( $request, $selected_blocks, $page_blocks, $page_context );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue