Skip to content

Instantly share code, notes, and snippets.

View joshcirre's full-sized avatar

Josh Cirre joshcirre

View GitHub Profile
@joshcirre
joshcirre / Chat.vue
Created June 7, 2025 00:30
Simple Chat App with Vue and useStream
<script setup lang="ts">
import StreamingIndicator from '@/components/StreamingIndicator.vue';
import { useStream } from '@laravel/stream-vue';
import { onMounted, onUnmounted, ref, watch } from 'vue';
type Message = {
type: 'response' | 'error' | 'prompt';
content: string;
};
const messages = ref<Message[]>([]);
const { data, send, cancel, isStreaming, id } = useStream('chat');
@joshcirre
joshcirre / keymap.json
Last active September 26, 2025 16:54
My Zed settings as a Laravel developer.
// Zed keymap
//
// For information on binding keys, see the Zed
// documentation: https://zed.dev/docs/key-bindings
//
// To see the default key bindings run `zed: open default keymap`
// from the command palette.
[
{
"context": "Workspace",
* {
font-family: Dank Mono, monospace;
}
.actions-container.highlight-toggled {
display: none !important;
}
.editor .title .actions-container .action-item a {
visibility: hidden;
<?php
use function Livewire\Volt\{state, mount};
use Illuminate\Support\Facades\Cache;
use function Illuminate\Log\log;
state([
'message' => 'Press Defer to Begin',
'is_polling' => true,
]);
// In Laravel app.js
import NProgress from 'nprogress';
Livewire.hook('commit', ({ component, commit, respond, succeed, fail }) => {
NProgress.start()
succeed(({ spanshot, effect }) => {
queueMicrotask(() => {
NProgress.done(true)