A Livewire-based chat interface for AI coding assistants like Claude Code, with support for multiple drivers.
composer require artisan-build/code-chat-clientAdd the Livewire component to your Blade view:
<livewire:code-chat /><livewire:code-chat
driver="claude-code"
:options="['model' => 'claude-3-5-sonnet-20241022']"
:show-driver-selector="true"
placeholder="Ask me anything..."
send-button-text="Send"
:max-height="600"
/>Publish the configuration file:
php artisan vendor:publish --tag=code-chat-client-configYou can add custom drivers by extending the ChatManager:
use ArtisanBuild\CodeChatClient\Facades\CodeChat;
CodeChat::extend('custom-driver', function ($app) {
return new CustomChatDriver();
});Your custom driver must implement ChatDriverContract:
use ArtisanBuild\CodeChatClient\Contracts\ChatDriverContract;
use ArtisanBuild\CodeChatClient\Contracts\ChatResponseContract;
class CustomChatDriver implements ChatDriverContract
{
public function send(string $message, array $options = []): ChatResponseContract
{
// Implementation
}
public function stream(string $message, callable $callback, array $options = []): void
{
// Implementation
}
public function getName(): string
{
return 'Custom Driver';
}
public function isAvailable(): bool
{
return true;
}
public function getDefaultOptions(): array
{
return [];
}
}- Multiple driver support
- Real-time streaming responses
- Flux UI integration
- Configurable appearance
- Error handling
- Chat history management
- Tool usage tracking
- PHP 8.1+
- Laravel 11+
- Livewire 3.0+
- Flux UI Pro license