Repository navigation
feat: AI chat module, first release - #1
Conversation
Ported from the whatsthere chat module without the map: ownership-scoped conversations, Vercel protocol streaming, provider errors kept in the stream and stripped of provider wording, and AI_CHAT_TEST_MODE canned replies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Vue page on @ai-sdk/vue: new chats move onto their own URL from the X-Conversation-Id header, an expired session is reported instead of an empty reply, reasoning and tool calls fold into a steps list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
about_my_account reads the signed-in user's profile, plus plan and limits when billing is installed and workspace when tenancy is; it takes the user from the agent, never an id from the model. generate_image stores to the public disk and renders inline. Canned scenarios cover both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ai_chat_messages and ai_chat_images are offered in the product form. Counted from stored messages and the month's image folder, no counter. A key no plan declares is unlimited, so installing the module never switches the chat off. Over the limit the stream answers 429 and the page says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AiChatSettings holds extra instructions, the models users may pick and the default; the stream route accepts only an offered model. A read-only Chats resource shows each conversation's transcript. Both need the 'manage ai chat' permission. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ask_this_assistant, read_current_chat, list_chat_sessions and open_chat_session, registered while the chat page is open. Helpers move to resources/js/lib so vitest covers them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e tail Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A 0.x-dev alias makes Composer guess ^0.0.0@dev on require, which no version matches, so installing the module into a new app failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Canned replies lacked X-Accel-Buffering, so nginx (Herd) delivered them
in one piece; the reply then finished before the move onto /chat/{id},
and the session reload cancelled that visit. The reload now waits for
the move, which refreshes the list itself.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every canned reply reused the conversation id as its messageId, so the SDK merged the second reply into the first and the first vanished. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Test mode stored nothing, so every chat reopened empty while there is no provider; it now stores both turns as laravel/ai would. show() reads the stored rows and restores generate_image results as image parts, which the text-only replay dropped for real replies too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New chat and the user's chats register at core's dashboard::sidebar.content, between the nav and the bottom links, on every signed-in page, instead of a second column on the chat page. Collapsed, a history button reopens the sidebar. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
laravel/ai sends images to Gemini by default; AI_CHAT_IMAGE_PROVIDER, AI_CHAT_IMAGE_MODEL and AI_CHAT_IMAGE_QUALITY choose instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The SDK edits a message's parts array in place, so ChatSteps, given that array, never re-rendered after the first part; test mode only looked right because reasoning came first. ChatMessage now computes the steps (lib stepsIn, unit-tested on the real stream's part shape). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- API keys per provider, encrypted, write-only in the form (blank keeps the saved key), applied to laravel/ai's config when it is first used; a saved key wins over .env. - The picker offers only models whose provider has a key. - The seeder offers OpenAI, Anthropic and Gemini's cheapest, default and smartest models from laravel/ai, defaulting to the cheapest, and never touches an admin's own list. - Image provider, model and quality as settings, .env as fallback. - Fix: clearing the instructions no longer fails the save. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
API keys are rows of provider and key: a saved key loads as its provider with the key left blank (kept on save), a removed row deletes the key, a provider takes one key. Models are an inline table whose provider is a select of laravel/ai's configured providers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One collapsible group per provider: its select, its write-only key (the placeholder says when the server environment provides one), a "Remove saved key" box, and its models as an inline table. The default model select is grouped the same way. Settings keep the flat shape; the page converts on fill and save. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The picker preselected the admin's default even when its provider had no key, and the server refused every message sent with it. The default now falls back to the first offered model, for the page and the stream. The admin field explains what the default model is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on phones The provider selects listed every config/ai.php entry, including embedding, reranking and audio providers that can't chat or draw. Providers asks laravel/ai which ones it can build a text or image client for, and names them as they write themselves (OpenAI-compatible, xAI, DeepSeek). On phones the model picker no longer takes half the input row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…able Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… WebMCP - Page rebuilt on shadcn-vue AI Elements: message scroller, markdown with code blocks, sources, images, an artifact panel, steps, and a message box with model picker and voice input. - Test mode plays demos (resources/demos/*.json) through a demo provider instead of canned replies: the real agent, tools, storage and stream run. - Sessions: date groups, rename (renamed_at keeps a chosen title) and delete. - Retry replaces the last turn instead of adding one, and a failed retry keeps the old answer. A stopped reply is still stored; streams get 300 s. - Back and forward reload the chat's messages; a refused message goes back into the box with the server's reason. - WebMCP: the page's tools are listed in a sidebar panel, with setup steps in browsers without WebMCP. - The mic and Stop buttons are type="button": as submit buttons in the form, the mic sent the text or stopped as soon as it started. - Focus, Escape to stop, a screen reader announcement per reply, example prompts, and copy and retry on touch screens. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Pin or unpin a chat from its … menu (tooltip "More"); pinned chats lead the list. - The sidebar lists every pinned chat and the newest 50 others; Show more adds 50, kept for the login session. - A chat opens on its newest 50 messages; older pages load as you scroll up. - The month's usage shows above the box (ChatInputBar in ChatInput's `top` slot): muted and dismissible from 80%, orange with Upgrade at the limit. Counted optimistically as a message is sent. - Code blocks no longer pass the markdown renderer's props onto the DOM. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The waiting line is the reasoning line itself (an empty reply renders it), so the thought takes over in place. Steps follow shadcn-vue's Reasoning: open while a thought streams, closed once done, a click overrides. While a reply arrives, its messages lay out at full size from the first frame. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A loaded transcript's questions count as handled (patched message-scroller): the first swap that kept the child count scrolled to the chat's first question. - No anchors or auto-scroll: a new question takes the view to the end once, the reply never drags it, and a button over the end shows dots while a reply streams below, an arrow after. A fixed 12rem gap replaces the screen-tall spacer that, shrinking, pulled the view. - New messages lay out at full size before joining content-visibility, so the scroller never places them by the 10rem estimate. - Older pages: measure the marker after the scroller restores the position. - Thoughts stay closed, render markdown, muted. New `thinking` demo. - The chat page's sidebar is resizable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`ai-chat.sessions`: `page` (default) gives the app sidebar a "Chat" item, which collapses to its icons on the chat, and the chat a resizable panel with New chat, search, the list and WebMCP (a sheet on phones). `sidebar` keeps the list in the app sidebar on every page, for a chat-first app. The shared list is only built where it shows. Search: GET chat/sessions/search, the user's chats by title; results follow a rename, pin or delete. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The chat page uses AppLayout's `resizable` and `collapseSidebar`, the nav item's `active` attribute and SidebarResizer inside a panel, all from core 3.3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ydration ChatPanel uses core 3.3's SidebarResizer `contained` instead of overriding its position. The panel width and the dismissed usage bar are read once mounted, so a server-rendered page hydrates with what it was rendered with. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedThis organization's CodeRabbit subscription is cancelled. Resubscribe in Billing to continue reviews beyond the free-tier limit. Next included review available in 43 minutes. View limit details
saucebase-dev is on CodeRabbit Free, which includes PR summaries. Ask your admin to upgrade for code reviews.
Walkthrough
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Release from
dev. Expected: v0.1.0 (first release, from 0.0.0). Merge with a merge commit.Needs core v3.3.0 (released): AppLayout's
resizableandcollapseSidebar, SidebarResizer'scontained, and Navigation'sactive.What it is
A chat page on laravel/ai, built on shadcn-vue AI Elements:
The chat list lives in its own resizable panel next to a collapsed app sidebar (
ai-chat.sessions=page, the default), or in the app sidebar (sidebar, set by the chat template).Checks
PHPUnit (119, with the chat template) and Pint pass. Browser QA of scroll, thinking, panel and search on the chat template.
🤖 Generated with Claude Code
Summary by CodeRabbit