llama.cpp/tools/server/webui/src/lib/utils
Rohan Jain 974c8c94cc
webui: add setting for first-line chat titles (#21797)
* webui: add setting for first-line chat titles

Add an opt-in setting (`titleGenerationUseFirstLine`) to use the first
non-empty line of a prompt as the generated conversation title.

Previously, the complete multi-line prompt was being used, which created
long titles for complex queries. Coupled with
"Ask for confirmation before changing conversation title", the dialog
would overflow.

* Update tools/server/webui/src/lib/utils/text.ts

Co-authored-by: Aleksander Grygier <aleksander.grygier@gmail.com>

* Update tools/server/webui/src/lib/utils/text.ts

Co-authored-by: Aleksander Grygier <aleksander.grygier@gmail.com>

* webui: Run build to update the bundle

As requested in:
https://github.com/ggml-org/llama.cpp/pull/21797#pullrequestreview-4094935065

* webui: Fix missing import for NEWLINE_SEPARATOR

---------

Co-authored-by: Aleksander Grygier <aleksander.grygier@gmail.com>
2026-04-13 09:30:46 +02:00
..
abort.ts WebUI Architecture Cleanup (#19541) 2026-02-12 11:22:27 +01:00
agentic.ts fix: Detect streaming state in reasoning content blocks (#21549) 2026-04-07 12:04:41 +02:00
api-fetch.ts webui: Agentic Loop + MCP Client with support for Tools, Resources and Prompts (#18655) 2026-03-06 10:00:39 +01:00
api-headers.ts webui: MCP Diagnostics improvements (#21803) 2026-04-13 07:58:38 +02:00
api-key-validation.ts server: (webui) add --webui-config (#18028) 2025-12-17 21:45:45 +01:00
attachment-display.ts webui: Agentic Loop + MCP Client with support for Tools, Resources and Prompts (#18655) 2026-03-06 10:00:39 +01:00
attachment-type.ts server: introduce API for serving / loading / unloading multiple models (#17470) 2025-12-01 19:41:04 +01:00
audio-recording.ts server: introduce API for serving / loading / unloading multiple models (#17470) 2025-12-01 19:41:04 +01:00
autoresize-textarea.ts SvelteKit-based WebUI (#14839) 2025-09-17 19:29:13 +02:00
branching.ts webui: Fix branching logic on edit message (#21175) 2026-03-30 14:40:50 +02:00
browser-only.ts WebUI Architecture Cleanup (#19541) 2026-02-12 11:22:27 +01:00
cache-ttl.ts webui: Improvements for Models Selector UI (#20066) 2026-03-05 08:52:22 +01:00
clipboard.ts webui: Agentic Loop + MCP Client with support for Tools, Resources and Prompts (#18655) 2026-03-06 10:00:39 +01:00
code.ts webui: Improvements for Models Selector UI (#20066) 2026-03-05 08:52:22 +01:00
config-helpers.ts server: introduce API for serving / loading / unloading multiple models (#17470) 2025-12-01 19:41:04 +01:00
conversation-utils.ts webui: use date in more human readable exported filename (#19939) 2026-03-16 11:18:13 +01:00
convert-files-to-extra.ts webui: Agentic Loop + MCP Client with support for Tools, Resources and Prompts (#18655) 2026-03-06 10:00:39 +01:00
cors-proxy.ts fix: Use lower-case proxy headers naming (#21235) 2026-03-31 17:47:46 +02:00
data-url.ts WebUI Architecture Cleanup (#19541) 2026-02-12 11:22:27 +01:00
debounce.ts WebUI Architecture Cleanup (#19541) 2026-02-12 11:22:27 +01:00
favicon.ts webui: Add MCP CORS Proxy detection logic & UI (#20167) 2026-03-16 13:05:36 +01:00
file-preview.ts Fix unreadable user markdown colors and truncate long texts in deletion dialogs (#17555) 2025-12-15 16:34:53 +01:00
file-type.ts webui: Improvements for Models Selector UI (#20066) 2026-03-05 08:52:22 +01:00
formatters.ts webui: Improvements for Models Selector UI (#20066) 2026-03-05 08:52:22 +01:00
headers.ts webui: Agentic Loop + MCP Client with support for Tools, Resources and Prompts (#18655) 2026-03-06 10:00:39 +01:00
image-error-fallback.ts WebUI Architecture Cleanup (#19541) 2026-02-12 11:22:27 +01:00
index.ts webui: add setting for first-line chat titles (#21797) 2026-04-13 09:30:46 +02:00
is-ime-composing.ts Prevent premature submission on IME input (#16673) 2025-10-20 14:21:12 +02:00
latex-protection.ts webui: Improvements for Models Selector UI (#20066) 2026-03-05 08:52:22 +01:00
legacy-migration.ts server/webui: cleanup dual representation approach, simplify to openai-compat (#21090) 2026-03-31 10:42:06 +02:00
mcp.ts webui: Agentic Loop + MCP Client with support for Tools, Resources and Prompts (#18655) 2026-03-06 10:00:39 +01:00
modality-file-validation.ts webui: Architecture and UI improvements (#19596) 2026-02-14 09:06:41 +01:00
model-names.ts server: introduce API for serving / loading / unloading multiple models (#17470) 2025-12-01 19:41:04 +01:00
pdf-processing.ts server: introduce API for serving / loading / unloading multiple models (#17470) 2025-12-01 19:41:04 +01:00
portal-to-body.ts webui: introduce OpenAI-compatible model selector in JSON payload (#16562) 2025-10-22 16:58:23 +02:00
precision.ts webui: Improvements for Models Selector UI (#20066) 2026-03-05 08:52:22 +01:00
process-uploaded-files.ts Webui/file upload (#18694) 2026-01-09 16:45:32 +01:00
redact.ts webui: MCP Diagnostics improvements (#21803) 2026-04-13 07:58:38 +02:00
request-helpers.ts webui: MCP Diagnostics improvements (#21803) 2026-04-13 07:58:38 +02:00
sanitize.ts webui: Agentic Loop + MCP Client with support for Tools, Resources and Prompts (#18655) 2026-03-06 10:00:39 +01:00
svg-to-png.ts server: introduce API for serving / loading / unloading multiple models (#17470) 2025-12-01 19:41:04 +01:00
syntax-highlight-language.ts server: introduce API for serving / loading / unloading multiple models (#17470) 2025-12-01 19:41:04 +01:00
text-files.ts webui: Improvements for Models Selector UI (#20066) 2026-03-05 08:52:22 +01:00
text.ts webui: add setting for first-line chat titles (#21797) 2026-04-13 09:30:46 +02:00
uri-template.ts webui: Agentic Loop + MCP Client with support for Tools, Resources and Prompts (#18655) 2026-03-06 10:00:39 +01:00
uuid.ts webui: Agentic Loop + MCP Client with support for Tools, Resources and Prompts (#18655) 2026-03-06 10:00:39 +01:00
webp-to-png.ts server: introduce API for serving / loading / unloading multiple models (#17470) 2025-12-01 19:41:04 +01:00