The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
fix(e2e): der Flash-Fall liest das neue Etikett und sagt den bezahlten Plan an
purple348521527994
diff --git a/e2e/flash-chat-billing.spec.ts b/e2e/flash-chat-billing.spec.tsindex 5a007cfe..51de61b2 100644--- a/e2e/flash-chat-billing.spec.ts+++ b/e2e/flash-chat-billing.spec.ts@@ -5,7 +5,11 @@ import { routeCloud, seedOnboardingDone, signInViaGate, cloudSwitch } from './sutest('flash metadata and paid fallback reach the actual desktop composer', async ({ page }) => {await page.addInitScript(tauriMockInit, { assistantReply: DEFAULT_ASSISTANT_REPLY, modelName: DEFAULT_MODEL_NAME })await seedOnboardingDone(page)- await routeCloud(page, { license: 'active', access: true, mediaLive: true })+ // Die Freimenge gehoert dem Konto und nicht dem Modell: Marke und stehender+ // Satz erscheinen nur bei `paidPlan: true`, weil der Chat-Vermittler nach+ // derselben Regel abrechnet. Ohne die Zeile antwortet `/api/me` ohne das+ // Feld, der Klient schweigt, und der Fall haette nichts zu sehen.+ await routeCloud(page, { license: 'active', access: true, mediaLive: true, paidPlan: true })const cors = { 'access-control-allow-origin': '*', 'access-control-allow-headers': 'authorization, content-type','access-control-expose-headers': 'x-lu-chat-billing, x-lu-flash-remaining' }await page.route('**/api/inference/v1/models', (route) => route.fulfill({ status: 200, headers: cors,@@ -34,9 +38,11 @@ test('flash metadata and paid fallback reach the actual desktop composer', asyncawait page.getByRole('button', { name: 'Select chat model', exact: true }).click()const row = page.getByRole('button', { name: /Llama 3.1 8B Turbo/ })// 7fa4b26b gab beiden Marken denselben Wortlaut in Auswahl und- // Eingabezeile: aus "Flash" wurde "No credits". Die Zeile selbst ist+ // Eingabezeile: aus "Flash" wurde "No credits". Entscheid 4 der Fixliste hat+ // daraus "Included" gemacht, weil "No credits" sich als Eigenschaft des+ // Modells las und eine Eigenschaft des Kontos ist. Die Zeile selbst ist// unveraendert, nur ihr Aufdruck.- await expect(row.getByText('No credits', { exact: true })).toBeVisible()+ await expect(row.getByText('Included', { exact: true })).toBeVisible()await row.click()await expect(page.getByTestId('flash-chat-notice')).toContainText('50,000 input and output tokens')const composer = page.locator('textarea').first()diff --git a/e2e/support/cloud-mock.ts b/e2e/support/cloud-mock.tsindex 978f1a2d..0fa8f48f 100644--- a/e2e/support/cloud-mock.ts+++ b/e2e/support/cloud-mock.ts@@ -21,6 +21,16 @@ export interface CloudScenario {/** Server MEDIA_LIVE switch surfaced via the catalog. Default true. */mediaLive?: booleantier?: string+ /**+ * /api/me license.paidPlan: hat dieses Konto je gezahlt?+ *+ * Die Freimengenmarke und der stehende Flash-Satz haengen daran und nicht am+ * Lizenzstatus, weil der Chat-Vermittler nach derselben Regel abrechnet. Ohne+ * Angabe fehlt das Feld in der Antwort, der Klient liest das als "noch nicht+ * beantwortet" und verspricht nichts. Ein Fall, der die Marke sehen will,+ * sagt es hier.+ */+ paidPlan?: boolean}const CORS: Record<string, string> = {@@ -81,7 +91,7 @@ export async function routeCloud(page: Page, scenario: CloudScenario): Promise<vuser: { id: USER.id, email: USER.email },license:scenario.license === 'active'- ? { status: 'active', tier, access }+ ? { status: 'active', tier, access, ...(scenario.paidPlan === undefined ? {} : { paidPlan: scenario.paidPlan }) }: { status: 'none' },profile: null,}),