llama.cpp/ui/apps/chat/tests/unit
Aleksander Grygier e8d7128fea
ui: type /cwd and other slash commands anywhere in the chat input (#33070)
* ui: type the working directory on a /cwd line in the chat input

On a desktop, choosing the working directory from the + menu or the chip
puts `/cwd <path>` above the message being written, with the caret after
the path, instead of opening a separate search field. The suggestions
follow what is typed there, Enter picks only from them, and closing the
picker gives the message back as it was.

The chat form's pickers float above the line being written, also in the
collapsed form, and fit their suggestions between a min and a max width.
A directory under home always shows from `~/`.

Assisted-by: Claude (Opus 5.5 Medium)

* ui: find working directories by a partial name, allowing for a typo

A plain name on the /cwd line is now looked up anywhere under home, not
only among its direct children, with the nearest folders listed first.
A search that finds nothing is retried allowing for one wrong, missing,
extra or swapped character.

Assisted-by: Claude (Fable 5.2)

* ui: keep the path pickers at one width and list hidden folders last

The @ mention and /cwd pickers no longer resize with their results, and
folders that are hidden or sit inside a hidden folder rank below regular
ones unless the query itself starts with a dot.

Assisted-by: Claude (Fable 5.2)

* ui: list a relative path's own folder before its deeper namesakes

A query with a path in it (ui/lib/voi) was matched only below some other
folder, never at the top of the scope, so hidden copies were the only
results. The path is now also followed from the scope itself and listed
first.

Assisted-by: Claude (Fable 5.2)

* ui: fix the folder pickers' review findings

- Read a backslash as a path separator under a Windows home or working
  directory, in the /cwd and @ pickers.
- Leave Enter to an IME composition, and to the message when the caret is
  below the /cwd line.
- Close the /cwd line before sending, so it is not sent as text.
- Keep the highlighted folder when the deeper results arrive, and do not
  leave the deep search's failure unhandled.
- Walk the typo search nearest depth first and stop once it finds something.
- Surface the deep search's error when a relative path finds nothing.

Assisted-by: Claude (Fable 5.2)

* ui: highlight the first suggestion of every new round in the pickers

A list that renders under a resting pointer no longer counts as a hover, and the
folder picker starts each round of results on its first folder.

Assisted-by: Claude (Fable 5.2)

* ui: keep the new chat's form in place as chips appear under it

Assisted-by: Claude (Fable 5.2)

* ui: drop the command picker's icons and shorten /compact's description

Assisted-by: Claude (Fable 5.2)

* ui: always edit the system message in the chat form, without a model selector

The + menu turns the form into the system message editor whether or not the
conversation shows its system message, and the editor offers no model selector.

Assisted-by: Claude (Fable 5.2)

* ui: add /system-message and keep the form's size in system message mode

The command turns the chat form into the system message editor. The editor's
dashed edge is an inset outline in place of the card's own edge, so the card
keeps its size.

Assisted-by: Claude (Fable 5.2)

* ui: find a rooted path's name further down, and retry a failed home lookup

`@~/llama.cpp` and `/cwd ~/llama.cpp` list `~/git/llama.cpp` when home itself
holds no such name. A failed lookup of the server's home directory is no longer
kept for the session, so the working directory can show from `~/` once it works.

Assisted-by: Claude (Fable 5.2)

* ui: type slash commands anywhere in the message

A command is found at the caret, after other words or on another line, not only
at the start of the input. Picking one takes just the command out and leaves the
words around it, and /cwd stays where it was typed (the + menu writes it at the
caret), so the path no longer jumps to a line of its own above the message.

Assisted-by: Claude (Opus 5.5)

* ui: keep the words after an argless command, and track /cwd by its edits

- only /prompt and /cwd read the words after them: Enter after
  `use /m the small one` no longer picks /model and deletes the sentence
- the open /cwd picker follows its own command after an edit, never
  another /cwd the message names, and closes when its command is deleted
- a blocked send leaves the /cwd command and its picker alone
- callers of the server home share one request
- a typo-tolerant folder search whose every glob fails shows the error
- hidden folders sort last behind backslash separators too

Assisted-by: Claude (Opus 5.5 Medium)
2026-11-26 21:25:36 +01:00
..
abort.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
agentic-flow.test.ts ui: fix tool result media shown twice, uncapped and dropped after its run (#33010) 2026-11-25 14:13:26 +01:00
agentic-hotpath.bench.ts ui: move the agentic loop and trace phrasing into @ggml-org/llama-harness (#32927) 2026-11-24 11:12:47 +01:00
agentic-max-turns-default.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
agentic-section-expansion.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
agentic-sections.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
agentic-strip.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
assistant-raw-output.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
async-queue.test.ts ui: move the agentic loop and trace phrasing into @ggml-org/llama-harness (#32927) 2026-11-24 11:12:47 +01:00
branching.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
brand-favicons.test.ts ui: move the web UI to ui/apps/chat and call it Llama Chat (#32032) 2026-11-16 17:23:36 +01:00
chat-activity.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
chat-form-expand.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
chat-form-model-state.test.ts ui: let the chat form's model selection decide the submit state (#32920) 2026-11-24 09:25:04 +01:00
chat-only-build.test.ts ui: open settings, the + menu and the model picker as sheets on phones, and manage MCP from settings (#33036) 2026-11-25 22:39:55 +01:00
classify-tool-result.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
cli.test.ts ui: npx llama-chat talks to llama-server on :9931 by default (#33095) 2026-11-26 08:52:24 +01:00
clipboard.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
code.test.ts ui: load highlight.js languages on demand (#32661) 2026-11-20 15:06:10 +01:00
command-token.test.ts ui: type /cwd and other slash commands anywhere in the chat input (#33070) 2026-11-26 21:25:36 +01:00
compaction.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
compute-line-diff.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
continue-intent.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
conversation-export.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
conversation-import.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
conversation-search.test.ts ui: search message content and Discover models from the search dialog (#32670) 2026-11-20 16:20:00 +01:00
conversations-store.test.ts ui: Llama UI design system: tokens, surfaces and fonts (#32468) 2026-11-17 14:39:03 +01:00
diagram-viewport.test.ts ui: full-screen diagram preview that zooms around what is on screen, inert diagrams (#32591) 2026-11-20 09:57:44 +01:00
folder-search.test.ts ui: type /cwd and other slash commands anywhere in the chat input (#33070) 2026-11-26 21:25:36 +01:00
formatters.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
gguf-metadata.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
glob-search-children.test.ts ui: type /cwd and other slash commands anywhere in the chat input (#33070) 2026-11-26 21:25:36 +01:00
headers.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
hf-helpers.test.ts ui: NVFP4 as 4-bit in Discover, model details inside Search (#33120) 2026-11-26 19:54:31 +01:00
hf-mmproj-modalities.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
incomplete-tool-calls.test.ts ui: drop tool calls cut off by Stop from the next request (#32738) 2026-11-23 16:18:59 +01:00
jpeg-orientation.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
latex-protection.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
lazy-highlight.test.ts ui: load highlight.js languages on demand (#32661) 2026-11-20 15:06:10 +01:00
lazy-katex.test.ts ui: cut Llama Chat's first-load JavaScript by 63%, load diagrams, math and PDFs on demand (#32555) 2026-11-19 08:37:35 +01:00
llama-ui-tsconfig-paths.test.ts ui: Llama UI design system: tokens, surfaces and fonts (#32468) 2026-11-17 14:39:03 +01:00
markdown-structure.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
markdown-syntax.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
mcp-default-overrides-merge.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
mcp-servers-default.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
mcp-service.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
mention-badge.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
mention-segments.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
mention-token.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
model-compatibility.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
model-families.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
model-id-parser.test.ts ui: NVFP4 as 4-bit in Discover, model details inside Search (#33120) 2026-11-26 19:54:31 +01:00
model-list.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
model-names.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
model-sidecar-grammar.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
models-quick-list.test.ts ui: open settings, the + menu and the model picker as sheets on phones, and manage MCP from settings (#33036) 2026-11-25 22:39:55 +01:00
parse-exec-shell-status.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
parse-mcp-server-settings.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
parse-toolcalls-memo.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
partial-tool-call-cleanup.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
pdf-dpi.test.ts DPI setting for PDF as Images - Inkling-2-Mini-BF16's work (#33061) 2026-11-26 14:57:50 +01:00
pwa.spec.ts ui: cut Llama Chat's first-load JavaScript by 63%, load diagrams, math and PDFs on demand (#32555) 2026-11-19 08:37:35 +01:00
queued-message-isolation.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
reasoning-context.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
redact.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
request-helpers.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
sanitize-headers.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
search-chats.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
search-results-fixture.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
search-results.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
server-config.test.ts ui: run Llama Chat apart from llama-server, named in config.json or npx --server (#32945) 2026-11-24 17:38:56 +01:00
settings-platform.test.ts ui: open settings, the + menu and the model picker as sheets on phones, and manage MCP from settings (#33036) 2026-11-25 22:39:55 +01:00
settings-private-fields.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
settings-tool-call-in-progress.test.ts ui: show an agentic reply as a grouped Agent Trace (#32879) 2026-11-23 17:24:05 +01:00
sse.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
storybook-sections.test.ts ui: Storybook follow-ups: generated DESIGN.md tokens, shared helpers and one Llama Mono (#32523) 2026-11-18 09:45:36 +01:00
stream-discovery.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
stream-finish.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
stream-resume.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
token-roles.test.ts ui: slim the design tokens and set all text through type roles (#32615) 2026-11-20 11:26:26 +01:00
tool-call-meta.test.ts ui: move Llama Chat to SvelteKit 3 and its built-in service worker (#32463) 2026-11-17 11:43:36 +01:00
tool-call-phrasing.test.ts ui: move the agentic loop and trace phrasing into @ggml-org/llama-harness (#32927) 2026-11-24 11:12:47 +01:00
tool-call-shown-arg.test.ts ui: show an agentic reply as a grouped Agent Trace (#32879) 2026-11-23 17:24:05 +01:00
tool-calls.test.ts ui: type /cwd and other slash commands anywhere in the chat input (#33070) 2026-11-26 21:25:36 +01:00
tool-result-media.test.ts ui: fix tool result media shown twice, uncapped and dropped after its run (#33010) 2026-11-25 14:13:26 +01:00
uri-template.test.ts ui: move the web UI to ui/apps/chat and call it Llama Chat (#32032) 2026-11-16 17:23:36 +01:00
voice-message-send.test.ts ui: fix tool result media shown twice, uncapped and dropped after its run (#33010) 2026-11-25 14:13:26 +01:00
voice-microphone.test.ts ui: voice messages and dictation with live waveforms and transcripts (#32531) 2026-11-20 16:34:52 +01:00
voice-mode.test.ts ui: voice messages and dictation with live waveforms and transcripts (#32531) 2026-11-20 16:34:52 +01:00
working-directory.test.ts ui: type /cwd and other slash commands anywhere in the chat input (#33070) 2026-11-26 21:25:36 +01:00