diff --git a/.github/workflows/ui.yml b/.github/workflows/ui.yml
index bba032416bfb..3547bf4c61e5 100644
--- a/.github/workflows/ui.yml
+++ b/.github/workflows/ui.yml
@@ -212,6 +212,38 @@ jobs:
run: npm run prepack
working-directory: ui/lib/harness
+ chat-only-build:
+ name: Chat-only build
+ runs-on: ubuntu-24.04
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v6
+ with:
+ ref: ${{ github.event.inputs.sha || github.event.pull_request.head.sha || github.sha || github.head_ref || github.ref_name }}
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v6
+ with:
+ node-version: "24"
+ package-manager-cache: false
+
+ - name: Install dependencies
+ run: npm ci
+ working-directory: ui/apps/chat
+
+ - name: Build without the agentic loop
+ run: npm run build
+ working-directory: ui/apps/chat
+ env:
+ VITE_PUBLIC_AGENTIC: "false"
+
+ - name: Check the harness loop is not in the bundle
+ run: |
+ if grep -rlq "Tool execution was interrupted by a new user message" dist; then
+ echo "The chat-only bundle contains Llama Harness's loop" && exit 1
+ fi
+ working-directory: ui/apps/chat
+
e2e-tests:
name: E2E Tests
needs: ui-build
diff --git a/ui/apps/chat/.env.example b/ui/apps/chat/.env.example
index 9760b0dd43fb..269e65278648 100644
--- a/ui/apps/chat/.env.example
+++ b/ui/apps/chat/.env.example
@@ -1,4 +1,6 @@
VITE_PUBLIC_APP_NAME='Llama Chat'
+# 'false' builds a chat-only app: no tools, no MCP, no agentic loop
+# VITE_PUBLIC_AGENTIC='false'
VITE_DEBUG='true'
VITE_PUBLIC_SERVER_ORIGIN='http://localhost:8033'
diff --git a/ui/apps/chat/.storybook/preview.ts b/ui/apps/chat/.storybook/preview.ts
index 22f04dd88609..47c884fd0f99 100644
--- a/ui/apps/chat/.storybook/preview.ts
+++ b/ui/apps/chat/.storybook/preview.ts
@@ -1,5 +1,6 @@
import '../src/app.css';
import { MEDIA_QUERIES } from '#lib/constants/pwa.constants.ts';
+import { agenticMode } from '#lib/stores/agentic-mode.svelte.ts';
// the docs pages' styles, shared with the library's Storybook
import '../../../lib/ui/.storybook/docs.css';
import { applyColorScheme } from './color-scheme';
@@ -7,6 +8,9 @@ import ModeWatcherDecorator from './decorators/ModeWatcherDecorator.svelte';
import TooltipProviderDecorator from './decorators/TooltipProviderDecorator.svelte';
import type { Preview } from '@storybook/sveltekit';
+// the stories show the app as with a llama-server started with --agent
+agenticMode.serverHasTools = true;
+
applyColorScheme();
window.matchMedia(MEDIA_QUERIES.PREFERS_DARK).addEventListener('change', applyColorScheme);
diff --git a/ui/apps/chat/README.md b/ui/apps/chat/README.md
index 891fe6b2a422..6ba2e8957d10 100644
--- a/ui/apps/chat/README.md
+++ b/ui/apps/chat/README.md
@@ -154,6 +154,10 @@ llama-server serves the UI with `Cross-Origin-Embedder-Policy: require-corp` and
llama-server embeds it: when llama-server is built, `scripts/ui-assets.cmake` takes `ui/apps/chat/dist` if it exists, runs `npm run build` if `LLAMA_BUILD_UI` is on, or downloads the release's prebuilt `dist.tar.gz` from Hugging Face, and compiles every file into the binary. The same `dist` is what `npx @ggml-org/llama-chat` serves.
+**Plain chat and agent mode.** Llama Chat is a plain chat, a message and its reply with reasoning when the model gives it, unless llama-server offers the agentic features: its built-in tools or its proxy, which `llama-server --agent` turns on together. The app reads this from `/props` and `/tools`. With them it shows the tools menu, the working folder, MCP and the Tools and Agentic settings, and runs the agentic loop; without them it shows none of these and sends the classic request. Tool calls in earlier conversations still display.
+
+**Chat-only build.** `VITE_PUBLIC_AGENTIC=false npm run build` builds an app that is a plain chat for every server, and `npm run dev:chat-only` runs the dev server the same way. Llama Harness's loop is left out of its bundle.
+
```text
ui/apps/chat/
├── src/
diff --git a/ui/apps/chat/eslint.config.js b/ui/apps/chat/eslint.config.js
index 330551d9d8d1..edbc71c487a3 100644
--- a/ui/apps/chat/eslint.config.js
+++ b/ui/apps/chat/eslint.config.js
@@ -266,7 +266,6 @@ export default ts.config(
'simple-import-sort/imports': ['error', { groups: [['.*']] }],
'svelte/no-at-html-tags': 'off',
// This app uses hash-based routing (#/) where resolve() from $app/paths does not apply
- 'svelte/no-navigation-without-resolve': 'off',
// Sort HTML attributes alphabetically in the markup. The Svelte directives
// (bind:/use:/animate:/style:/in:/out:/transition:/class:) sort first,
@@ -321,6 +320,12 @@ export default ts.config(
}
}
},
+ {
+ // type information for the app's own modules too, so svelte/no-navigation-without-resolve
+ // accepts a URL typed as ResolvedPathname, such as RouterService.chat(id)
+ files: ['src/**/*.ts'],
+ languageOptions: { parserOptions: { projectService: true } }
+ },
{
// Exclude generated build output and Storybook files from ESLint
ignores: [
diff --git a/ui/apps/chat/package.json b/ui/apps/chat/package.json
index bc3f0d3315d1..76146f41e5b0 100644
--- a/ui/apps/chat/package.json
+++ b/ui/apps/chat/package.json
@@ -43,6 +43,7 @@
"build": "npm run build-pwa-assets && vite build",
"build-pwa-assets": "pwa-assets-generator --root . --config pwa-assets.config.ts && pwa-assets-generator --root . --config pwa-assets-dark.config.ts && node scripts/make-icons-circular.js",
"dev": "bash scripts/dev.sh",
+ "dev:chat-only": "VITE_PUBLIC_AGENTIC=false bash scripts/dev.sh",
"preview": "vite preview",
"prepare": "svelte-kit sync || echo ''",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddButton.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddButton.svelte
index e25bcb56f72c..11c8a19544dd 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddButton.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddButton.svelte
@@ -2,7 +2,8 @@
import { Button } from '@ggml-org/llama-ui/ui/button';
import * as Tooltip from '@ggml-org/llama-ui/ui/tooltip';
import { Plus } from '@lucide/svelte';
- import { ATTACHMENT_TOOLTIP_TEXT, ICON_CLASS_DEFAULT } from '#lib/constants/index.ts';
+ import { attachmentTooltipText, ICON_CLASS_DEFAULT } from '#lib/constants/index.ts';
+ import { agenticMode } from '#lib/stores/agentic-mode.svelte.ts';
interface Props {
disabled?: boolean;
@@ -21,13 +22,13 @@
type="button"
variant="ghost"
>
- {ATTACHMENT_TOOLTIP_TEXT}
+ {attachmentTooltipText(agenticMode.enabled)}
-
{ATTACHMENT_TOOLTIP_TEXT}
+
{attachmentTooltipText(agenticMode.enabled)}
diff --git a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddDropdown.svelte b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddDropdown.svelte
index 78153bfbdfbe..d86d663f3808 100644
--- a/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddDropdown.svelte
+++ b/ui/apps/chat/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddDropdown.svelte
@@ -9,13 +9,14 @@
ATTACHMENT_FILE_ITEMS,
ATTACHMENT_MENU_TEXT,
ATTACHMENT_MODALITY_TEXT,
- ATTACHMENT_TOOLTIP_TEXT,
+ attachmentTooltipText,
ICON_CLASS_DEFAULT,
MODALITY_ICONS
} from '#lib/constants/index.ts';
import { getChatFormActionsContext } from '#lib/contexts/index.ts';
import { AttachmentAction, AttachmentItemEnabledWhen, ModelModality } from '#lib/enums/index.ts';
import { useAttachmentMenu } from '#lib/hooks/use-attachment-menu.svelte.ts';
+ import { agenticMode } from '#lib/stores/agentic-mode.svelte.ts';
import type { Component } from 'svelte';
interface Props {
@@ -84,7 +85,7 @@
)}
disabled={chatFormActions.disabled}
>
- {ATTACHMENT_TOOLTIP_TEXT}
+ {attachmentTooltipText(agenticMode.enabled)}
@@ -92,7 +93,7 @@
-