feat(console): save command history in session (#1282)

This commit is contained in:
Gabriel 2025-04-22 18:29:17 -03:00 committed by GitHub
parent b16e19b4fb
commit 6427903f9f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,6 +11,7 @@ use App\Services\Nodes\NodeJWTService;
use App\Services\Servers\GetUserPermissionsService;
use Filament\Widgets\Widget;
use Illuminate\Support\Arr;
use Livewire\Attributes\Session;
use Livewire\Attributes\On;
class ServerConsole extends Widget
@ -26,6 +27,7 @@ class ServerConsole extends Widget
public ?User $user = null;
/** @var string[] */
#[Session(key: 'server.{server.id}.history')]
public array $history = [];
public int $historyIndex = 0;