dolibarr 25.0.0-alpha
command.php File Reference

Commands of the chat's "/" palette: tasks that take several pages in Dolibarr, done from one line. More...

Go to the source code of this file.

Functions

 aiCommandAnswer ($db, $user, $query, $startTime, array $response, $status='Success')
 Answer the browser, log the command like the other assistant requests, and stop.
 

Variables

 $context = (is_array($input) && isset($input['context']) && is_array($input['context'])) ? $input['context'] : array()
 @method int call_trigger(string $triggerName, ?User $user)
 

Detailed Description

Commands of the chat's "/" palette: tasks that take several pages in Dolibarr, done from one line.

No AI provider is involved.

  • /invoice, /order, /proposal, /supplier-invoice, /supplier-order: a draft from "customer qty [unit] product [price]; ...", through the API bridge, so the write still stops at the confirmation.
  • /total: totals of the rows ticked on a list (or of the rows shown).

Definition in file command.php.

Function Documentation

◆ aiCommandAnswer()

aiCommandAnswer ( $db,
$user,
$query,
$startTime,
array $response,
$status = 'Success' )

Answer the browser, log the command like the other assistant requests, and stop.

Parameters
DoliDB$dbDatabase handler
User$userUser
string$queryCommand as typed
float$startTimeStart of the request
array<string,mixed>$response Answer
string$statusLog status
Returns
never

Definition at line 225 of file command.php.

References ai_log_request().