amir9480 / vscode-laravel-extra-intellisense

This extension adds extra autocompletion for laravel projects to VSCode.
https://marketplace.visualstudio.com/items?itemName=amiralizadeh9480.laravel-extra-intellisense
MIT License
3.44k stars 55 forks source link

In laravel telescope logs "list" console command every minute #130

Open didoin opened 1 month ago

didoin commented 1 month ago

The problem is caused by the Helpers.runLaravel function, which runs every minute and simulates the execution of a console command without arguments (default list).

// helpers.ts
...
"$app->register(new VscodeLaravelExtraIntellisenseProvider($app));" +
"$kernel = $app->make(Illuminate\\Contracts\\Console\\Kernel::class);" +

"$status = $kernel->handle(" +
    "$input = new Symfony\\Component\\Console\\Input\\ArgvInput," +
    "new Symfony\\Component\\Console\\Output\\ConsoleOutput" +
");" +
"if ($status == 0) {" +
"   echo '___VSCODE_LARAVEL_EXTRA_INSTELLISENSE_OUTPUT___';" +
        code +
    "   echo '___VSCODE_LARAVEL_EXTRA_INSTELLISENSE_END_OUTPUT___';" +
"}" +
...

Is it possible to modify the code to avoid the console call or if not, give an argument to the command so that it can be filtered by telescope?

Example:

// config/telescope.php
'watchers' => [
    Watchers\CommandWatcher::class => [
        'enabled' => env('TELESCOPE_COMMAND_WATCHER', true),
        'ignore' => [
            '[CUSTOM_ARGV]',
        ],
    ],
]