Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 118 additions & 0 deletions .github/workflows/nextjs_bundle_analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0

name: 'Next.js Bundle Analysis'

on:
pull_request:
push:
branches:
- main # change this if your default branch is named differently
workflow_dispatch:

defaults:
run:
# change this if your nextjs app does not live at the root of the repo
working-directory: ./

permissions:
contents: read # for checkout repository
actions: read # for fetching base branch bundle stats
pull-requests: write # for comments

jobs:
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Update GitHub Actions to supported major versions (actionlint)
The workflow uses older action majors flagged by actionlint. Upgrade to current majors compatible with hosted runners.

Apply:

-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v4
...
-      - name: Restore next build
-        uses: actions/cache@v3
+      - name: Restore next build
+        uses: actions/cache@v4
...
-      - name: Download base branch bundle stats
-        uses: dawidd6/action-download-artifact@v2
+      - name: Download base branch bundle stats
+        uses: dawidd6/action-download-artifact@v6

Also applies to: 36-36, 63-63

🧰 Tools
🪛 actionlint (1.7.7)

27-27: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🤖 Prompt for AI Agents
In .github/workflows/nextjs_bundle_analysis.yml at lines 27, 36, and 63, the
GitHub Actions use older major versions flagged by actionlint. Update the action
versions to their latest supported major versions compatible with hosted runners
by changing the version tags (e.g., from v2 to v3 or the latest stable major)
for all actions used at these lines.


- name: Install Bun
uses: oven-sh/setup-bun@v2

- name: Install dependencies
run: bun install

Comment on lines +32 to +34
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Make dependency installation reproducible in CI
Use Bun’s lockfile-enforced mode to avoid drift across runs.

-      - name: Install dependencies
-        run: bun install
+      - name: Install dependencies
+        run: bun install --frozen-lockfile --no-progress

Optional: cache Bun’s global package data to speed up installs. I can add that if desired.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Install dependencies
run: bun install
- name: Install dependencies
run: bun install --frozen-lockfile --no-progress
🤖 Prompt for AI Agents
In .github/workflows/nextjs_bundle_analysis.yml at lines 32 to 34, the
dependency installation step uses "bun install" without enforcing the lockfile,
which can cause non-reproducible installs. Modify the command to "bun install
--frozen-lockfile" to ensure the lockfile is strictly respected during
installation. Optionally, consider adding caching for Bun’s global package data
to speed up subsequent installs.

- name: Restore next build
uses: actions/cache@v3
id: restore-build-cache
env:
cache-name: cache-next-build
with:
# if you use a custom build directory, replace all instances of `.next` in this file with your build directory
# ex: if your app builds to `dist`, replace `.next` with `dist`
path: .next/cache
# change this if you prefer a more strict cache
key: ${{ runner.os }}-build-${{ env.cache-name }}

Comment on lines +35 to +46
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Harden Next.js build cache key to prevent stale caches
Current key is constant, risking incorrect cache hits. Include lockfile hash and os.

       - name: Restore next build
         uses: actions/cache@v4
         id: restore-build-cache
         env:
           cache-name: cache-next-build
         with:
           # if you use a custom build directory, replace all instances of `.next` in this file with your build directory
           # ex: if your app builds to `dist`, replace `.next` with `dist`
           path: .next/cache
           # change this if you prefer a more strict cache
-          key: ${{ runner.os }}-build-${{ env.cache-name }}
+          key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/bun.lockb', '**/package-lock.json', '**/pnpm-lock.yaml', '**/yarn.lock') }}
+          restore-keys: |
+            ${{ runner.os }}-${{ env.cache-name }}-
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Restore next build
uses: actions/cache@v3
id: restore-build-cache
env:
cache-name: cache-next-build
with:
# if you use a custom build directory, replace all instances of `.next` in this file with your build directory
# ex: if your app builds to `dist`, replace `.next` with `dist`
path: .next/cache
# change this if you prefer a more strict cache
key: ${{ runner.os }}-build-${{ env.cache-name }}
- name: Restore next build
uses: actions/cache@v4
id: restore-build-cache
env:
cache-name: cache-next-build
with:
# if you use a custom build directory, replace all instances of `.next` in this file with your build directory
# ex: if your app builds to `dist`, replace `.next` with `dist`
path: .next/cache
# change this if you prefer a more strict cache
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/bun.lockb', '**/package-lock.json', '**/pnpm-lock.yaml', '**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
🧰 Tools
🪛 actionlint (1.7.7)

36-36: the runner of "actions/cache@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🤖 Prompt for AI Agents
In .github/workflows/nextjs_bundle_analysis.yml around lines 35 to 46, the cache
key for restoring the Next.js build is too generic and can cause stale cache
hits. Update the cache key to include a hash of the lockfile (e.g.,
package-lock.json or yarn.lock) and the runner OS to ensure the cache is
invalidated when dependencies change. This will make the cache key unique per
dependency state and OS, preventing incorrect cache usage.

- name: Build next.js app
# change this if your site requires a custom build command
run: bun run build

# Here's the first place where next-bundle-analysis' own script is used
# This step pulls the raw bundle stats for the current bundle
- name: Analyze bundle
run: bunx -p nextjs-bundle-analysis report

Comment on lines +54 to +55
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Pin nextjs-bundle-analysis tool version for deterministic results
Ephemeral bunx pulls latest, which can change behaviour. Pin the version (or add as devDependency).

-        run: bunx -p nextjs-bundle-analysis report
+        run: bunx -p [email protected] report

Same for compare below.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
run: bunx -p nextjs-bundle-analysis report
run: bunx -p nextjs-bundle-analysis@0.7.0 report
🤖 Prompt for AI Agents
In .github/workflows/nextjs_bundle_analysis.yml at lines 54-55, the command uses
bunx to run nextjs-bundle-analysis without specifying a version, causing
non-deterministic results due to ephemeral latest pulls. Fix this by pinning the
nextjs-bundle-analysis tool version explicitly in the command or by adding it as
a devDependency in package.json and referencing that fixed version in the
workflow. Apply the same version pinning approach to the compare command
mentioned below in the file.

- name: Upload bundle
uses: actions/upload-artifact@v4
with:
name: bundle
path: .next/analyze/__bundle_analysis.json

- name: Download base branch bundle stats
uses: dawidd6/action-download-artifact@v2
if: success() && github.event.number
with:
workflow: nextjs_bundle_analysis.yml
branch: ${{ github.event.pull_request.base.ref }}
path: .next/analyze/base

# And here's the second place - this runs after we have both the current and
# base branch bundle stats, and will compare them to determine what changed.
# There are two configurable arguments that come from package.json:
#
# - budget: optional, set a budget (bytes) against which size changes are measured
# it's set to 350kb here by default, as informed by the following piece:
# https://infrequently.org/2021/03/the-performance-inequality-gap/
#
# - red-status-percentage: sets the percent size increase where you get a red
# status indicator, defaults to 20%
#
# Either of these arguments can be changed or removed by editing the `nextBundleAnalysis`
# entry in your package.json file.
- name: Compare with base branch bundle
if: success() && github.event.number
run: ls -laR .next/analyze/base && bunx -p nextjs-bundle-analysis compare

- name: Get Comment Body
id: get-comment-body
if: success() && github.event.number
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings
run: |
echo "body<<EOF" >> $GITHUB_OUTPUT
echo "$(cat .next/analyze/__bundle_analysis_comment.txt)" >> $GITHUB_OUTPUT
echo EOF >> $GITHUB_OUTPUT
- name: Find Comment
uses: peter-evans/find-comment@v2
if: success() && github.event.number
id: fc
with:
issue-number: ${{ github.event.number }}
body-includes: '<!-- __NEXTJS_BUNDLE -->'

- name: Create Comment
uses: peter-evans/create-or-update-comment@v2
if: success() && github.event.number && steps.fc.outputs.comment-id == 0
with:
issue-number: ${{ github.event.number }}
body: ${{ steps.get-comment-body.outputs.body }}

- name: Update Comment
uses: peter-evans/create-or-update-comment@v2
if: success() && github.event.number && steps.fc.outputs.comment-id != 0
with:
issue-number: ${{ github.event.number }}
body: ${{ steps.get-comment-body.outputs.body }}
comment-id: ${{ steps.fc.outputs.comment-id }}
edit-mode: replace
1,094 changes: 911 additions & 183 deletions bun.lock

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import type { NextConfig } from 'next';

const nextConfig: NextConfig = {
output: 'standalone',
eslint: {
ignoreDuringBuilds: true,
},
Comment on lines +5 to +7
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Scope ESLint suppression; don’t disable it globally

Hard-coding ignoreDuringBuilds: true disables lint checks for all builds, reducing code-quality guardrails. Make it conditional via an environment flag and keep a separate lint job gating PRs.

Apply this diff to only disable ESLint where explicitly intended (e.g., bundle analysis job):

-  eslint: {
-    ignoreDuringBuilds: true,
-  },
+  eslint: {
+    ignoreDuringBuilds: process.env.NEXT_IGNORE_ESLINT === 'true',
+  },

Example: enable only in the bundle analysis workflow step/job:

# .github/workflows/nextjs_bundle_analysis.yml (snippet)
jobs:
  bundle-analysis:
    steps:
      - name: Build for analysis
        env:
          NEXT_IGNORE_ESLINT: 'true'
        run: npm run build

Optionally, enforce lint in a dedicated job:

jobs:
  lint:
    steps:
      - run: npm ci
      - run: npm run lint

Verification script to confirm a separate lint gate exists:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Searching for ESLint usage in workflows..."
fd -t f -H .github/workflows || true
rg -n -S -A2 -B2 "(next lint|eslint)" .github/workflows || echo "No explicit ESLint steps found in workflows."

echo "Checking for a lint script in package.json..."
rg -n -S '"lint"\s*:' package.json || echo "No 'lint' script found in package.json."

echo "If neither a workflow lint step nor a package.json lint script exists, consider adding them to keep linting enforced."

Length of output: 1093


Ensure ESLint is only skipped when explicitly requested and enforce linting in CI

We’ve confirmed there’s a "lint": "next lint" script in package.json but no dedicated lint job in your workflows. To keep build guardrails:

  1. Make ignoreDuringBuilds conditional on an env var:
    // next.config.ts
    eslint: {
    -  ignoreDuringBuilds: true,
    +  ignoreDuringBuilds: process.env.NEXT_IGNORE_ESLINT === 'true',
    },
  2. In your bundle‐analysis workflow (or wherever you need to skip ESLint), set the flag:
    # .github/workflows/nextjs_bundle_analysis.yml
    jobs:
      bundle-analysis:
        steps:
          - name: Build for analysis
            env:
              NEXT_IGNORE_ESLINT: 'true'
            run: npm run build
  3. Add a dedicated lint job to your CI workflows to run npm run lint, for example:
    # .github/workflows/lint.yml
    name: Lint
    on: [pull_request, push]
    jobs:
      eslint:
        runs-on: ubuntu-latest
        steps:
          - uses: actions/checkout@v3
          - run: npm ci
          - run: npm run lint

This ensures linting remains enforced on every PR while still allowing you to bypass it when explicitly needed.

🤖 Prompt for AI Agents
In next.config.ts around lines 5 to 7, the ESLint configuration currently always
ignores linting during builds. Modify the ignoreDuringBuilds setting to be
conditional based on an environment variable, such as NEXT_IGNORE_ESLINT, so
ESLint is only skipped when explicitly requested. Then, update your GitHub
workflows by adding the NEXT_IGNORE_ESLINT environment variable set to 'true' in
jobs where you want to skip linting, and create a dedicated lint job that runs
npm run lint on every pull request and push to enforce linting in CI.

experimental: {
serverActions: {
bodySizeLimit: '8mb',
Expand Down
24 changes: 16 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
"format": "ultracite format"
},
"dependencies": {
"@ai-sdk/anthropic": "^1.2.12",
"@ai-sdk/google": "^1.2.19",
"@ai-sdk/groq": "^1.2.9",
"@ai-sdk/openai": "^1.3.22",
"@ai-sdk/react": "^1.2.12",
"@ai-sdk/anthropic": "^2.0.1",
"@ai-sdk/google": "^1.2.22",
"@ai-sdk/groq": "^2.0.4",
"@ai-sdk/openai": "^1.3.24",
"@ai-sdk/react": "^2.0.9",
"@ai-sdk/ui-utils": "^1.2.11",
"@ai-sdk/xai": "^1.2.16",
"@ai-sdk/xai": "^1.2.18",
"@aws-sdk/client-s3": "^3.826.0",
"@biomejs/biome": "2.0.6",
"@logto/next": "^4.2.4",
Expand All @@ -26,7 +26,7 @@
"@radix-ui/react-label": "^2.1.7",
"@radix-ui/react-separator": "^1.1.7",
"@radix-ui/react-slot": "^1.2.3",
"ai": "^4.3.16",
"ai": "^4.3.19",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"daisyui": "^5.0.43",
Expand All @@ -47,17 +47,25 @@
"sonner": "^2.0.5",
"tailwind-merge": "^3.3.0",
"tailwind-variants": "^1.0.0",
"zod": "^3.25.56"
"zod": "^3.25.76"
},
"devDependencies": {
"@tailwindcss/postcss": "^4.1.8",
"@types/node": "^22.15.30",
"@types/react": "^19",
"@types/react-dom": "^19",
"@types/react-syntax-highlighter": "^15.5.13",
"eslint": "^9.33.0",
"eslint-config-next": "^15.4.6",
"tailwindcss": "^4.1.8",
"tw-animate-css": "^1.3.4",
"typescript": "^5",
"ultracite": "5.0.32"
},
"nextBundleAnalysis": {
"budget": null,
"budgetPercentIncreaseRed": 20,
"minimumChangeThreshold": 0,
"showDetails": true
}
Comment on lines +65 to 70
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Confirm nextjs-bundle-analysis config keys; avoid budget: null if unsupported

Ensure the tool reads these exact keys from package.json. If budget is optional, omit it rather than setting to null to prevent parsing issues.

Please check the tool’s expected package.json schema:

If budget should be omitted, apply:

   "nextBundleAnalysis": {
-    "budget": null,
     "budgetPercentIncreaseRed": 20,
     "minimumChangeThreshold": 0,
     "showDetails": true
   }

🌐 Web query:

What configuration keys does "nextjs-bundle-analysis" read from package.json, and are "budgetPercentIncreaseRed", "minimumChangeThreshold", and "showDetails" valid? Should "budget" be omitted or set to null?

💡 Result:

The "nextjs-bundle-analysis" GitHub Action reads configuration from the "nextBundleAnalysis" key in your project's package.json[1]. It accepts only specific configuration keys, and their validity is determined by the documented options. Based on available documentation, here are the answers to your key questions:

Supported package.json Configuration Keys

The action specifically mentions the following keys under "nextBundleAnalysis"[1]:

  • showDetails (boolean): Valid; controls whether detailed sections are rendered in the bundle analysis comment (default: true)[1].
  • buildOutputDirectory (string): Valid; for specifying the custom Next.js build output directory. Default is .next[1].

Validity of Specific Keys

Key Valid Notes
showDetails Yes Directly documented as an option controlling UI detail[1].
budgetPercentIncreaseRed No Not mentioned or documented as a supported key[1].
minimumChangeThreshold No Not mentioned or documented as a supported key[1].

No current documentation supports budgetPercentIncreaseRed or minimumChangeThreshold as valid configuration keys for "nextjs-bundle-analysis" in package.json[1]. If these are present, they may be ignored or unsupported by the tool.

Handling the budget Key

The documentation refers only to performance budgets in general but does not specify a budget property in the package.json configuration section[1]. The workflow might contain details relating to budgets, but there is no mention that setting "budget": null in package.json is required or supported. If a budget key is present without clear documentation, it's safest to omit it rather than set it to null[1].

Summary

  • You should only include well-documented keys (showDetails, buildOutputDirectory) in "nextBundleAnalysis" within package.json[1].
  • The keys budgetPercentIncreaseRed, minimumChangeThreshold, and a plain budget key are not valid according to current GitHub and npm documentation[1]. They should be omitted unless updated documentation specifically adds support.
  • Use "showDetails" for controlling display detail, and "buildOutputDirectory" to set your build output location[1].

If you need advanced budgeting features, you may need to configure these within the GitHub workflow file itself, not in the package.json[1].

Citations:


Update unsupported nextBundleAnalysis keys in package.json

Only the documented options (showDetails and buildOutputDirectory) are read from nextBundleAnalysis. Remove the unsupported keys (budget, budgetPercentIncreaseRed, minimumChangeThreshold) to avoid them being ignored or causing parsing issues.

• In package.json under "nextBundleAnalysis":
– Keep: showDetails (boolean)
– Optionally add: buildOutputDirectory (string, default: .next)
– Remove: budget, budgetPercentIncreaseRed, minimumChangeThreshold

Suggested diff:

 "nextBundleAnalysis": {
-  "budget": null,
-  "budgetPercentIncreaseRed": 20,
-  "minimumChangeThreshold": 0,
   "showDetails": true
 }

If you require performance budgets, configure them within your GitHub workflow rather than in the package.json.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"nextBundleAnalysis": {
"budget": null,
"budgetPercentIncreaseRed": 20,
"minimumChangeThreshold": 0,
"showDetails": true
}
"nextBundleAnalysis": {
"showDetails": true
}
🤖 Prompt for AI Agents
In package.json lines 63 to 68, the nextBundleAnalysis section contains
unsupported keys budget, budgetPercentIncreaseRed, and minimumChangeThreshold
that should be removed because only showDetails and buildOutputDirectory are
valid. Remove these unsupported keys and optionally add buildOutputDirectory if
needed, keeping showDetails as is. This will prevent parsing issues and ensure
only recognized options are present.

}
4 changes: 1 addition & 3 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended"
]
"extends": ["config:recommended"]
}
2 changes: 1 addition & 1 deletion src/actions/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { logtoConfig } from '@/lib/auth';
import { prisma } from '@/lib/prisma';

const ModelNameToId: Record<string, string> = Object.entries(Models)
.flatMap(([providerKey, provider]) =>
.flatMap(([_providerKey, provider]) =>
provider.models.map((model) => [model.name, model.id])
)
.reduce((acc, [name, id]) => ({ ...acc, [name]: id }), {});
Expand Down
2 changes: 1 addition & 1 deletion src/actions/image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ async function generate(

const ModelInfoFromID: Record<string, { name: string; description: string }> =
Object.entries(Models)
.flatMap(([providerKey, provider]) =>
.flatMap(([_providerKey, provider]) =>
provider.models.map(
(model) =>
[
Expand Down
8 changes: 2 additions & 6 deletions src/actions/ollama.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,15 @@ export const validateOllamaHost = async (host: string) => {
throw new Error('Invalid Ollama host');
}
const data = await response.json();
// @ts-expect-error
if (!(data && data.data)) {
if (!data?.data) {
throw new Error('No data returned from Ollama host');
}
return {
isValid: true,
// @ts-expect-error
modelCount: data.data.length,
// @ts-expect-error
models: data.data,
};
} catch (error) {
console.error('Error validating Ollama host:', error);
} catch (_error) {
return {
isValid: false,
modelCount: 0,
Expand Down
4 changes: 1 addition & 3 deletions src/app/(chat)/chat/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { getLogtoContext } from '@logto/next/server-actions';
import { notFound, redirect } from 'next/navigation';
import * as React from 'react';
import { ChatContainer } from '@/components/chatContainer';
import { ChatMeta } from '@/components/chatMeta';
import Models from '@/consts/models.json' with { type: 'json' };
Expand All @@ -9,7 +8,7 @@ import { prisma } from '@/lib/prisma';

const ModelInfoFromID: Record<string, { name: string; description: string }> =
Object.entries(Models)
.flatMap(([providerKey, provider]) =>
.flatMap(([_providerKey, provider]) =>
provider.models.map(
(model) =>
[
Expand Down Expand Up @@ -101,7 +100,6 @@ export default async function Home({
//@ts-expect-error
initialMessages={formattedMessages}
model={chat.model}
//@ts-expect-error
models={modelsArray}
/>
</div>
Expand Down
4 changes: 1 addition & 3 deletions src/app/(chat)/chat/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { getLogtoContext } from '@logto/next/server-actions';
import { redirect } from 'next/navigation';
import * as React from 'react';
import { validateOllamaHost } from '@/actions/ollama';
import { ChatInput } from '@/components/chatInput';
import models from '@/consts/models.json' with { type: 'json' };
Expand Down Expand Up @@ -56,7 +54,7 @@ export default async function Home() {
isAvailable: hostInfo.isValid,
models: hostInfo.models,
});
} catch (error) {
} catch (_error) {
ollamaModels.push({
...host,
endpoint: host.endpoint,
Expand Down
1 change: 0 additions & 1 deletion src/app/(chat)/image/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { getLogtoContext } from '@logto/next/server-actions';
import Link from 'next/link';
import * as React from 'react';
import { ImageGenerator } from '@/components/imageGenerator';
import models from '@/consts/image_models.json' with { type: 'json' };
import { logtoConfig } from '@/lib/auth';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default async function Home() {
const hostInfo = await validateOllamaHost(model.endpoint);
model.isAvailable = hostInfo.isValid;
model.modelCount = hostInfo.modelCount;
} catch (error) {
} catch (_error) {
model.isAvailable = false;
}
}
Expand Down
Loading
Loading