feat: remove ai-chat extension from hosted version, move chat widget to bottom-right
Remove ai-chat from extensions.config.json and docker/extensions.hosted.json (kept in self-hosted config). Remove ChatWidget imports from dashboard layout and root page. Reposition chat widget FAB and panel to bottom-right corner. Regenerate extension registry. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
497ef876bb
commit
50bf7b3b0f
@@ -1,7 +1,6 @@
|
|||||||
import { createClient } from '@/lib/supabase/server'
|
import { createClient } from '@/lib/supabase/server'
|
||||||
import { redirect } from 'next/navigation'
|
import { redirect } from 'next/navigation'
|
||||||
import DashboardNav from '@/components/dashboard/DashboardNav'
|
import DashboardNav from '@/components/dashboard/DashboardNav'
|
||||||
import { ChatWidget } from '@/components/chat'
|
|
||||||
import { RecaptIdentify } from '@/components/RecaptIdentify'
|
import { RecaptIdentify } from '@/components/RecaptIdentify'
|
||||||
import type { EntityType } from '@/types'
|
import type { EntityType } from '@/types'
|
||||||
|
|
||||||
@@ -55,7 +54,6 @@ export default async function DashboardLayout({
|
|||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
<ChatWidget />
|
|
||||||
<RecaptIdentify
|
<RecaptIdentify
|
||||||
userId={user.id}
|
userId={user.id}
|
||||||
email={user.email}
|
email={user.email}
|
||||||
|
|||||||
+7
-7
@@ -48,6 +48,13 @@ export default function RootLayout({
|
|||||||
<html lang="sv" suppressHydrationWarning>
|
<html lang="sv" suppressHydrationWarning>
|
||||||
<head>
|
<head>
|
||||||
<link rel="apple-touch-icon" href="/icons/icon-192.png" />
|
<link rel="apple-touch-icon" href="/icons/icon-192.png" />
|
||||||
|
<script
|
||||||
|
src="https://cdn.recapt.app/browser/glimt.js"
|
||||||
|
async
|
||||||
|
data-public-key="pk_8de220ce34c81413de154d10ff681a9eb3a5a9c12d28bd6c7bc2613c9f5acfbb"
|
||||||
|
data-persist
|
||||||
|
data-enable-user-comments
|
||||||
|
/>
|
||||||
</head>
|
</head>
|
||||||
<body
|
<body
|
||||||
className={`${geistSans.variable} ${geistMono.variable} ${fraunces.variable} antialiased`}
|
className={`${geistSans.variable} ${geistMono.variable} ${fraunces.variable} antialiased`}
|
||||||
@@ -62,13 +69,6 @@ export default function RootLayout({
|
|||||||
<Toaster />
|
<Toaster />
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
<Script src="/sw-register.js" strategy="afterInteractive" />
|
<Script src="/sw-register.js" strategy="afterInteractive" />
|
||||||
<Script
|
|
||||||
src="https://cdn.recapt.app/browser/glimt.js"
|
|
||||||
strategy="afterInteractive"
|
|
||||||
data-public-key="pk_8de220ce34c81413de154d10ff681a9eb3a5a9c12d28bd6c7bc2613c9f5acfbb"
|
|
||||||
data-persist
|
|
||||||
data-enable-user-comments
|
|
||||||
/>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import { redirect } from 'next/navigation'
|
|||||||
import DashboardNav from '@/components/dashboard/DashboardNav'
|
import DashboardNav from '@/components/dashboard/DashboardNav'
|
||||||
import DashboardContent from '@/components/dashboard/DashboardContent'
|
import DashboardContent from '@/components/dashboard/DashboardContent'
|
||||||
import type { Deadline, ReceiptQueueSummary } from '@/types'
|
import type { Deadline, ReceiptQueueSummary } from '@/types'
|
||||||
import { ChatWidget } from '@/components/chat'
|
|
||||||
|
|
||||||
export default async function RootPage() {
|
export default async function RootPage() {
|
||||||
const supabase = await createClient()
|
const supabase = await createClient()
|
||||||
@@ -230,7 +229,6 @@ export default async function RootPage() {
|
|||||||
enabledExtensions={enabledToggles || []}
|
enabledExtensions={enabledToggles || []}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<ChatWidget />
|
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"extensions": ["enable-banking", "ai-categorization", "ai-chat", "email"]}
|
{"extensions": ["enable-banking", "ai-categorization", "email"]}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"$schema":"./extensions.schema.json","extensions":["enable-banking","ai-chat","email"]}
|
{"$schema":"./extensions.schema.json","extensions":["enable-banking","email"]}
|
||||||
|
|||||||
@@ -2,6 +2,5 @@
|
|||||||
|
|
||||||
export const ENABLED_EXTENSION_IDS: ReadonlySet<string> = new Set([
|
export const ENABLED_EXTENSION_IDS: ReadonlySet<string> = new Set([
|
||||||
'enable-banking',
|
'enable-banking',
|
||||||
'ai-chat',
|
|
||||||
'email',
|
'email',
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
// AUTO-GENERATED — do not edit. Run `npm run setup:extensions` to regenerate.
|
// AUTO-GENERATED — do not edit. Run `npm run setup:extensions` to regenerate.
|
||||||
import type { Extension } from '../types'
|
import type { Extension } from '../types'
|
||||||
import { enableBankingExtension } from '@/extensions/general/enable-banking'
|
import { enableBankingExtension } from '@/extensions/general/enable-banking'
|
||||||
import { aiChatExtension } from '@/extensions/general/ai-chat'
|
|
||||||
import { emailExtension } from '@/extensions/general/email'
|
import { emailExtension } from '@/extensions/general/email'
|
||||||
|
|
||||||
export const FIRST_PARTY_EXTENSIONS: Extension[] = [
|
export const FIRST_PARTY_EXTENSIONS: Extension[] = [
|
||||||
enableBankingExtension,
|
enableBankingExtension,
|
||||||
aiChatExtension,
|
|
||||||
emailExtension,
|
emailExtension,
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -15,35 +15,6 @@ export const EXTENSION_DEFINITIONS: Record<string, ExtensionDefinition[]> = {
|
|||||||
"hasOwnData": true,
|
"hasOwnData": true,
|
||||||
"subscriptionNotice": "Denna integration kräver ett aktivt Enable Banking-abonnemang. Utan abonnemang kommer bankintegration inte att fungera."
|
"subscriptionNotice": "Denna integration kräver ett aktivt Enable Banking-abonnemang. Utan abonnemang kommer bankintegration inte att fungera."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"slug": "ai-chat",
|
|
||||||
"name": "AI-assistent",
|
|
||||||
"sector": "general",
|
|
||||||
"category": "operations",
|
|
||||||
"icon": "MessageSquare",
|
|
||||||
"dataPattern": "both",
|
|
||||||
"description": "AI-assistent för skatte- och bokföringsfrågor med tillgång till din data",
|
|
||||||
"longDescription": "Ställ frågor om skatt, bokföring och företagande till en AI-assistent som förstår svensk redovisning. Kan hämta och visualisera din bokföringsdata — fakturor, transaktioner, resultaträkning, balansräkning och mer.",
|
|
||||||
"readsCoreTables": [
|
|
||||||
"invoices",
|
|
||||||
"supplier_invoices",
|
|
||||||
"transactions",
|
|
||||||
"journal_entries",
|
|
||||||
"journal_entry_lines",
|
|
||||||
"fiscal_periods",
|
|
||||||
"company_settings",
|
|
||||||
"customers",
|
|
||||||
"suppliers",
|
|
||||||
"chart_of_accounts"
|
|
||||||
],
|
|
||||||
"hasOwnData": true,
|
|
||||||
"quickAction": {
|
|
||||||
"label": "AI-assistent",
|
|
||||||
"description": "Fråga om bokföring",
|
|
||||||
"icon": "MessageSquare",
|
|
||||||
"event": "open-ai-chat"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"slug": "email",
|
"slug": "email",
|
||||||
"name": "E-post (Resend)",
|
"name": "E-post (Resend)",
|
||||||
|
|||||||
@@ -5,5 +5,4 @@ import type { WorkspaceComponentProps } from '../workspace-registry'
|
|||||||
|
|
||||||
export const WORKSPACES: Record<string, ComponentType<WorkspaceComponentProps>> = {
|
export const WORKSPACES: Record<string, ComponentType<WorkspaceComponentProps>> = {
|
||||||
'general/enable-banking': dynamic(() => import('@/components/extensions/general/EnableBankingWorkspace')),
|
'general/enable-banking': dynamic(() => import('@/components/extensions/general/EnableBankingWorkspace')),
|
||||||
'general/ai-chat': dynamic(() => import('@/components/extensions/general/AiChatWorkspace')),
|
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-2
@@ -7,11 +7,12 @@ const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL ?? "";
|
|||||||
|
|
||||||
const cspDirectives = [
|
const cspDirectives = [
|
||||||
"default-src 'self'",
|
"default-src 'self'",
|
||||||
`connect-src 'self' ${supabaseUrl} https://*.supabase.co wss://*.supabase.co https://*.ingest.sentry.io https://*.enablebanking.com`,
|
`connect-src 'self' ${supabaseUrl} https://*.supabase.co wss://*.supabase.co https://*.ingest.sentry.io https://*.enablebanking.com https://*.recapt.app`,
|
||||||
`style-src 'self' 'unsafe-inline' https://*.enablebanking.com`,
|
`style-src 'self' 'unsafe-inline' https://*.enablebanking.com`,
|
||||||
`script-src 'self' 'unsafe-inline'${isDev ? " 'unsafe-eval'" : ""} https://*.enablebanking.com`,
|
`script-src 'self' 'unsafe-inline'${isDev ? " 'unsafe-eval'" : ""} https://*.enablebanking.com https://cdn.recapt.app`,
|
||||||
"img-src 'self' data: blob: https:",
|
"img-src 'self' data: blob: https:",
|
||||||
"font-src 'self'",
|
"font-src 'self'",
|
||||||
|
"worker-src 'self' blob:",
|
||||||
"frame-ancestors 'none'",
|
"frame-ancestors 'none'",
|
||||||
].join("; ");
|
].join("; ");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user