d8c8cc4d9b225e4a3bc552a8ecec949cd255bb39
19
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
b5cb8f6f47 |
ui: keep a hidden sidebar from intercepting clicks again (#32035)
The hidden desktop strip relied on inherited `visibility: hidden` to keep its content from catching clicks. Since the sidebar's sections fold (#31936), an open section's CollapsibleRegion sets `visibility: visible` again, and its rows' context-menu triggers carry an inline `pointer-events: auto`, so they caught clicks meant for the page. Make the hidden strip's content inert, which no descendant can undo, and add a client test that hit-tests the hidden sidebar's area. Fixes #31971 Assisted-by: Claude (Opus 5.5 Medium) |
||
|
|
54cde7106a |
ui: expand the chat form into a large editor for longer messages (#31973)
* ui: expand the chat form into a large editor for longer messages The chat form expands into a large editor once a message has markdown beyond plain paragraphs or reaches four lines, and a Maximize button in its top-right corner toggles it by hand. The expanded form starts around half the screen height and grows with the text up to the space below the tabs bar, animating its height by mirroring the editor's content height. On a new chat the expanded form keeps the collapsed form's top edge and the greeting only fades out, waiting for a collapse to settle before it fades back in. In a conversation the messages follow the form as it grows, so the latest one stays in view above it. Assisted-by: Claude (Opus 5.5 Medium) * ui: make the expanded chat form a full-screen sheet on phones In the expanded editor Enter adds a line and Cmd/Ctrl+Enter sends. On a phone the expanded form is a full-screen sheet with no corners or border. The page around it and Safari's bars take its colour, and the sidebar's logo button and the working-directory chip step aside while it is open. It moves by relative offsets and a clip on the main thread, so its edges, text, actions and chip stay in step in every engine, and its content keeps the collapsed card's places and widths, so nothing reflows when it settles. Expanding does not focus the editor on a phone. On a new chat on desktop the form is lifted by its sticky bottom offset instead of a translate, and the expanded size is built on the collapsed card's real height, so its top edge holds still through any sequence of quick toggles. Assisted-by: Claude (Opus 5.5 Medium) * ui: hide the phone menu toggle and the sheet's focus edge while expanded On a phone the menu toggle rides on the page, above the chat form: it now fades out while the expanded form covers the screen, and comes back when it collapses. The expanded sheet also drops the glass rim and inner ring, so focusing the editor no longer outlines the whole screen. Assisted-by: Claude (Opus 5.5 Medium) * ui: keep the expanded phone sheet clear of the status bar The expanded chat form fills the screen on a phone, under the status bar an installed app draws over the page. Its text now starts below the bar (pt-safe) and its collapse button sits below it too (top-safe-2.5). Assisted-by: Claude (Opus 5.5 Medium) * ui: hide the phone's context gauge while the chat form is expanded The gauge pinned to the phone's top right sat over the expanded sheet's collapse key. Like the menu toggle across from it, it now fades out while the expanded form covers the screen and comes back when it collapses. Assisted-by: Claude (Opus 5.5 Medium) * ui: lift the expanded phone sheet's actions above the iOS keyboard Assisted-by: Claude (Opus 5.5 Medium) * ui: move the chat form with a short, quick drift, without sliding after it lands Its position transition came back on before the browser had laid out the new position, so it slid the form there after the fade; the drift is now 10px each way and quicker. Assisted-by: Claude (Opus 5.5 Medium) * ui: style the expanded chat form with master's surfaces until the design system lands Assisted-by: Claude (Opus 5.5 Medium) * ui: tighten the expanding chat form after review - Expand on markdown only in finished lines: a lone `-`, `#` or `1.` on the line being typed no longer opens the large editor. - Show "Cmd/Ctrl+Enter to send" by the send button while expanded. - Move the expansion state, the phone sheet and the held collapsed height into useChatFormExpansion, and the sheet's geometry into pure functions. - Drop the working-directory chip's phone animation, which never ran since the phone chip moved to the + menu. - Clearing or sending mid-move cancels the sheet's animation. - A click only continues at the end of the text when it lands below it. - Reuse ActionIcon for the toggle and INPUT_CLASSES for the card, derive the centered form's offset from its drop, name the shared easing and fade. - The greeting owns its fade behind the expanded form. - MarkdownEditor's view is reactive, so following its content starts once it exists. Assisted-by: Claude (Fable 5.2) * ui: keep the expanded chat form to the message being written - The form expands on its own only for what is written or pasted, and another conversation starts collapsed: a restored draft no longer opens the large editor, or the phone sheet, on arriving at a chat. - In the expanded editor the pickers open by the line being written, above it or, short of room, below, instead of above the form's top edge. - The sidebar's swipe is off while the phone sheet covers the screen. - The send hint shows only beside the send button, where the row has room. - The inner area keeps master's focus shadow, except on the phone sheet. - The card and the form's position honour reduced motion. - The phone greeting's place accounts for the wrapper it is counted from. - The sheet's animation tolerates the form going away mid-move. Assisted-by: Claude (Fable 5.2) * ui: turn the typed pickers off on phones, and scroll long messages - On a phone, typing `/` or `@` opens no picker for now: each mobile browser moves the page its own way as the keyboard opens, so a list by the form can not stay clear of the text being written. A note marks it for later. - The editor scrolls inside the form again: MarkdownEditor's own box sat between the input and the editor without taking its height, so a message longer than the form ran under the actions instead of scrolling. Assisted-by: Claude (Fable 5.2) * ui: settle the expanding chat form's review findings - A phone expands the form only by hand: the sheet switching in mid-typing moves the text under the keyboard. - The typed pickers are off wherever a finger is the main pointer, not below a viewport width, so a narrow desktop window keeps them and an iPad loses them. The prompt picker opened from the + menu floats by the sheet's actions on a phone. - A message put back after a failed send expands the form again. - Only the left button moves the caret from a click below the text. - The sheet's fill is one token, used by the sheet, the page and Safari's bars. - The collapsed-height hold is its own module and no longer finds the editor's elements by class name. - Shorter comments. Assisted-by: Claude (Sonnet 5.5) * ui: keep a one-line message on the chat form's actions row On a desktop the main chat form is a single pill while its message is one line: the add button, the text, then the model selector and send. A second line, or a line that wraps beside the actions, brings back the two rows, and they stay until the text is shorter than where it wrapped, so the wider row can not flip it straight back. The editor stays mounted: the actions join the text's row by CSS alone. The single row's corners are `--chat-form-single-row-radius` in app.css, a pill by default; the "Scrapbook / ChatForm single row" story shows the real form with other radii. Assisted-by: Claude (Opus 5.5) * ui: give the one-line chat form 1.25rem corners Assisted-by: Claude (Opus 5.5) * ui: pick the working directory from the + menu on desktop too The chip under the chat form is gone: the + menu offers the working directory everywhere but a phone's chat, whose header shows it. The menu item names the directory once one is set, and the picker gains a row to clear it, which the chip's X used to do. Assisted-by: Claude (Opus 5.5) * ui: put the single-row chat form behind a Display setting "Single-row chat form for short messages", on by default. Assisted-by: Claude (Opus 5.5) * ui: send the chat form on Enter, and add a line with Shift or Ctrl/Cmd Enter sends wherever the caret is, the expanded editor and code blocks included; Shift+Enter and Ctrl/Cmd+Enter add a line, continuing lists and quotes. With "Send message on Enter" off the two swap as before. The expanded editor's send hint and the code-block rule are gone with it. Assisted-by: Claude (Opus 5.5) * ui: start the chat form on the row layout it will settle on Assisted-by: Claude (Opus 5.5) * ui: show a set working directory under the chat form again On desktop the chip under the form is back once a directory is set, and the + menu offers the directory only until then. Assisted-by: Claude (Opus 5.5) * ui: add a line on Enter with an on-screen keyboard A phone's Return has no Shift, so on a touch screen Enter adds a line and the send button sends, as "Send message on Enter" turned off does; on a desktop Enter still sends. Assisted-by: Claude (Opus 5.5) |
||
|
|
ac007054e7 |
ui: use a live-preview markdown editor for the chat form input (#31955)
* ui: use a live-preview markdown editor for the chat form input Replace the contenteditable rich input with a CodeMirror editor that shows the markdown source of the block being edited and renders every other block through the MarkdownContent pipeline and stylesheet, so they match chat messages. Plain text types exactly as before, the value stays the exact markdown source, and mention links show as atomic badges. The editor lives in a shared MarkdownEditor component, and the highlight.js theme loader is shared between MarkdownContent and SyntaxHighlightedCode. The old rich input, its tokenizer, source history and their tests go away. Assisted-by: Claude (Opus 5.5 Medium) * ui: give the production build more memory, note what mdsvex is for The single-bundle build now includes CodeMirror and runs past Node's default heap limit on CI runners. Raise it in the build script, so local and CI builds behave the same on every platform. Assisted-by: Claude (Opus 5.5 Medium) * ui: keep the live preview's blocks while only the cursor moves Moving the cursor re-walked the syntax tree and rebuilt every block's decoration. Keep the blocks with the decorations and rebuild only when the text changes or the cursor enters another block. Assisted-by: Claude (Opus 5.5 Medium) * ui: point the chat form story at the editor and drop the engraved placeholder until the design system lands Assisted-by: Claude (Opus 5.5 Medium) * ui: name the markdown editor for screen readers CodeMirror's content is a textbox with no name of its own, so the chat form input was announced as an unnamed text box, and could not be found by its name as the old input could. It takes an aria-label, its placeholder by default, which makes the chat form's "Type a message..." again. Assisted-by: Claude (Opus 5.5 Medium) * ui: format the chat form input's classes Assisted-by: Claude (Opus 5.5 Medium) * ui: share the markdown styles and diagram drawing between messages and the editor The editor and MarkdownContent each @imported markdown-content.css into their own <style>, so the bundle carried two scoped copies of it. Both now render into a MarkdownSurface, the one element that carries the stylesheet; the few rules for MarkdownContent's own template elements are global under .markdown-content. Drawing mermaid and svg blocks and the actions of their header buttons move to markdown-diagrams.ts, so the editor's rendered blocks can draw diagrams the same way messages do. Assisted-by: Claude (Opus 5.5 Medium) * ui: harden the live preview editor after review - onChange skips only the editor's own syncs from `value`, marked by an annotation, instead of reporting only edits that carry a user event - Enter and the mention badges ask the syntax tree whether they are in code, so ~~~ fences and indented code count, and a closing fence ends a block - a picked mention is one undoable edit, through replaceText - rendered blocks draw mermaid and svg diagrams with their header buttons, a $$ math block with blank lines renders as one block, and a link reference definition stays raw instead of rendering to nothing - rendered blocks render again when the mention path settings change - a drag in a rendered block selects its text and copy takes it, across blocks; a click still opens the block - the block margins are the ones a chat message renders (each heading is a first child there), checked by a test; the blank lines after a raw block are its gap - the tree comes from syntaxTree, without forcing a full parse on every edit - placeholder, label, extensions, mention widgets and render key follow prop changes after mount, through compartments - the editor uses the markdown language alone, which drops the html, css and javascript parsers markdown() pulls in for html tag completion (-70 KB gzip) Assisted-by: Claude (Opus 5.5 Medium) * ui: pin the CodeMirror packages and set the build heap in .npmrc The new dependencies are pinned like the rest of package.json. The build heap moves from a node call on vite's bin path to npm's node-options, so the build script is plain `vite build` again and the setting reaches it on every platform. Assisted-by: Claude (Opus 5.5 Medium) * ui: update the live preview block by block and estimate block heights An edit used to build every block's decorations and widgets again, which the editor then compared one by one. The previous decorations, and the mention badges of raw blocks, now move through the edit, and only the blocks whose range, text, raw or rendered state, or gap changed get new ones; the texts of the blocks an edit left alone are reused instead of sliced again. A test drives random edits, cursor moves and focus changes and checks each result against a full build. Rendered blocks report the height they were last measured at, or a guess from their text, so CodeMirror's height map for blocks off screen in a long document stays close and scrolling stays steady. Assisted-by: Claude (Opus 5.5 Medium) * ui: skip the editor's redundant syncs, reconfigures and theme reloads - syncing `value` compares it with the text the editor last reported or synced, so a keystroke coming back through onChange no longer serializes the document again - the prop effects reconfigure the editor only when a prop changed, not once more right after it is created (which rebuilt the whole preview) - loadHighlightTheme leaves the theme's style element alone while the mode stays, so a message or an editor mounting no longer restyles the whole page Tests check that typing in one block leaves the other rendered blocks without a single DOM mutation, and that mounting reconfigures nothing. Assisted-by: Claude (Opus 5.5 Medium) * ui: simplify the live preview to a plain rebuild in three small modules Rebuilding the decorations of every block on an edit measures the same as patching only the changed ones (0.09 ms against 0.11 ms per keystroke at 200 blocks, 0.9 ms against 1.1 ms at 2000), and equal widgets keep their DOM either way, so the incremental update and its test go. - markdown-blocks.ts collects the document's blocks, markdown-block-widget.ts renders one, markdown-live-preview.ts decides which ones show raw text - one bounded cache holds a block's HTML and its measured height - the render key is a plain option: a new one reconfigures the preview, which keeps the editor's focus - MarkdownEditor follows its props with one helper instead of five effects Assisted-by: Claude (Opus 5.5 Medium) * ui: keep setext headings raw in the live preview editor `test` over `---` is a setext heading, so the preview rendered it as an h2 and the underline vanished once the cursor left the block. The editor now shows a setext heading's text as typed at all times, like a link reference definition. Assisted-by: Claude (Opus 5.5 Medium) * ui: add a setting to turn the live markdown preview off "Live markdown preview in the message input" (General) is on by default. Off, the input shows the plain markdown text, with file mention badges still in place; switching it takes effect without a reload. Assisted-by: Claude (Opus 5.5 Medium) |
||
|
|
610f7ab40a |
ui: make the app feel native on phones (#31949)
* ui: reveal the mobile sidebar by sliding the page aside On a phone the sidebar now stays put under the page, and the page slides right to uncover it, as a rounded card with the card border. The menu button rides on the page; a swipe from the left edge opens the sidebar, and a swipe back or a tap on the page closes it. Assisted-by: Claude (Opus 5.5 Medium) * ui: polish the mobile sidebar reveal and add a hold menu to rows Holding a conversation row on a phone opens its action menu anchored to the row, in place of the hidden three-dot trigger. The page no longer widens the document when it slides aside, so iOS stops panning it on the first open. The page and sidebar backgrounds start in the page color and blend into the sidebar tint as the sidebar opens, following a drag frame by frame, and a theme-color tag follows them for the browser bars. The sidebar's contents fade in on a log curve and scale up slightly, and sit at the same inset as the menu toggle, which now uses a two-line icon in a filled circle. Assisted-by: Claude (Opus 5.5 Medium) * ui: pin the context gauge on phones and lock the slid-aside page On a phone the context gauge leaves the chat form for the top right of the chat screen, in a round button across from the menu toggle. Both take the scroll-down button's frosted look. While the sidebar is out, and until the page is fully back in place, the page neither scrolls nor takes taps; a tap or drag on it still closes the sidebar. Assisted-by: Claude (Opus 5.5 Medium) * ui: open the mobile sidebar with a swipe from anywhere A rightward swipe from anywhere on the page now opens the phone sidebar too, beside the edge swipe that competes with the browser's own back and forward gesture. It starts after a short sideways move, skips text fields and content that scrolls sideways, and keeps the page from scrolling under it. Letting go opens or closes the sidebar past 30% of the way or on a flick. The top buttons and the chat form now hold their place on screen while the page is slid aside, instead of jumping to the far ends of a scrolled conversation. Assisted-by: Claude (Opus 5.5 Medium) * ui: hide the model org name on mobile unless a setting keeps it A phone's model selector is narrow, so it now drops the organization from model names by default. A new Display setting, "Show organization name on mobile", brings it back; it applies only while the organization name is shown at all. Assisted-by: Claude (Opus 5.5 Medium) * ui: close the mobile sidebar before following a tap in it On a phone, picking a conversation, New chat, Search, MCP or Settings in the open sidebar now slides it shut first and acts 180ms later, so the page or dialog appears once the sidebar is out of the way. With the sidebar already closed, or on a desktop, the action runs at once. Assisted-by: Claude (Opus 5.5 Medium) * ui: make the app feel native on phones and run it under the status bar Applies the mobile-native checklist: no tap highlight or landscape text inflation, instant taps on buttons and links, no label selection or callout on a held control, hover styles only where a pointer can hover, and 16px textareas on phones so focusing them does not zoom the page. The page now runs under the notch (viewport-fit=cover), so the installed iOS app tints its status bar from the page and the sidebar. The menu toggle, the context gauge, the sidebar and the top of the chat and models pages pad themselves clear of it, and the locked, slid page reaches down by the status bar's height, which iOS leaves out of it. Assisted-by: Claude (Opus 5.5 Medium) * ui: add a viewport height readout for debugging on phones With VITE_DEBUG set, a dev build shows the window, viewport unit and safe-area heights, and the elements that reach past the window's bottom and make the page scroll. It is loaded on demand, so production builds leave it out. Assisted-by: Claude (Opus 5.5 Medium) * ui: fill the screen from launch in the installed iOS app iOS 26 gives an installed app with viewport-fit=cover and a translucent status bar a viewport short of that bar (WebKit bug 301108), clipping the bottom of the page and lifting the chat form, but only while the page is shorter than the screen. In the installed app the page now reaches the screen plus the status bar, capped at the screen, so it gets the full screen from the start without ever scrolling. Assisted-by: Claude (Opus 5.5 Medium) * ui: raise the phone's corner controls in the installed app The installed app's status bar already sets the menu toggle, the context gauge and the open sidebar's logo apart from the screen's edge, so they sit just below it rather than a full 1rem lower. They share one value, which stays at 1rem below the inset in a browser tab. Assisted-by: Claude (Opus 5.5 Medium) * ui: add safe-area utilities for what is pinned to a screen edge The page runs under the status bar and over the home indicator, which an installed iPhone app always shows. New pt-safe, pb-safe, top-safe and bottom-safe utilities, each with a spacing step (pt-safe-12 is 3rem plus the top inset), keep pinned content clear of them instead of hand-written calc()s. A --safe-area-bottom joins --safe-area-top, and the chat screen and Models page use pt-safe-12. Assisted-by: Claude (Opus 5.5 Medium) * ui: open search in a full-height drawer on phones A phone used to leave for the /search page. It now opens the same search as the desktop dialog, in a bottom drawer that fills the screen below the status bar. Keyboard shortcuts, the Enter hint and the keyboard highlight stay on desktop, and so does the models manager, as in the phone sidebar. Assisted-by: Claude (Opus 5.5 Medium) * ui: show every dialog full screen on phones, clear of the status bar A phone now shows every dialog full screen, whatever size it asks for on a desktop, instead of each full-screen dialog repeating its own classes. Its top and bottom borders take the status bar's and the home indicator's height, transparent, so an installed app's dialogs keep their content clear of both with no change to their padding. The attachment preview, which has its own full-screen content, pads itself and lowers its close button the same way. Assisted-by: Claude (Opus 5.5 Medium) * ui: fade the page out under the status bar of the installed app on phones Assisted-by: Claude (Opus 5.5 Medium) * ui: show search in the full-screen dialog on phones instead of a drawer Assisted-by: Claude (Opus 5.5 Medium) * ui: start a phone page's title a row below the corner controls Assisted-by: Claude (Opus 5.5 Medium) * ui: pin the slid page's bottom bars against the screen in the installed iOS app Assisted-by: Claude (Opus 5.5 Medium) * ui: cast a soft shadow from the slid page onto the phone sidebar Assisted-by: Claude (Opus 5.5 Medium) * ui: hide the scroll-down key at the real bottom on iOS and show it only well above Assisted-by: Claude (Opus 5.5 Medium) * ui: fade the status-bar fade out as the page slides aside for the sidebar Assisted-by: Claude (Opus 5.5 Medium) * ui: draw the slid page's shadow above its rounded frame, so it follows the corners Assisted-by: Claude (Opus 5.5 Medium) * ui: show a phone chat's title and working directory at the top, and pick it in a drawer Assisted-by: Claude (Opus 5.5 Medium) * ui: give iOS Safari a solid top and fade the bottom of the screen on phones Assisted-by: Claude (Opus 5.5 Medium) * ui: let iOS Safari find the top strip, which it skips when it takes no taps Assisted-by: Claude (Opus 5.5 Medium) * ui: lengthen the top fade and lift the chat form a little in phone browsers Assisted-by: Claude (Opus 5.5 Medium) * ui: give iOS Safari's bottom toolbar the page's colour, not the chat form's Assisted-by: Claude (Opus 5.5 Medium) * ui: draw the phone's context gauge key like the menu key across from it Assisted-by: Claude (Opus 5.5 Medium) * ui: confirm opening the phone sidebar, its hold menu and its rows with a haptic tap Assisted-by: Claude (Opus 5.5 Medium) * ui: keep the screen-edge fades on the page as it slides aside for the sidebar Fading them out with the slide made the page flicker; the rounded frame over the slid page already clips them at its corners. Assisted-by: Claude (Opus 5.5 Medium) * ui: keep the working directory chip optional for hosts with their own trigger The phone layout opens the picker from the chat's header, so ChatForm hides the chip there. Master's version of the chip has no such switch; bring it back. Assisted-by: Claude (Opus 5.5 Medium) * ui: style layer 5's additions with master's tokens until the design system lands Assisted-by: Claude (Opus 5.5 Medium) * ui: drop the design system's stylesheets and fonts from app.css until it lands Assisted-by: Claude (Opus 5.5 Medium) * ui: keep master's font stacks until the design system brings its fonts Assisted-by: Claude (Opus 5.5 Medium) * ui: restore master's colour palette in app.css until the design system lands Resolving the safe-area commit took the design system's app.css, which drops the palette for its token files and aliases the shadcn names to semantic tokens. With the tokens gone those aliases point at themselves, so every colour went invalid: transparent surfaces and currentColor borders. Assisted-by: Claude (Opus 5.5 Medium) * ui: center alert dialogs on phones instead of sliding them up as drawers An alert is a short question, not a drawer: on a phone it is now a centered card, 90% of the screen wide and as tall as its text, scrolling only past the screen's height. It zooms in as on desktop, and its footer drops the margin the sheet needed. Assisted-by: Claude (Opus 5.5 Medium) * ui: space the working directory drawer for a phone The drawer reused the popover's compact picker: Browse sat against the search field, the divider ran past the rows and each row had its own inset. In the drawer the picker now takes the header's inset, gives Browse room, lines its rows up with the search results and sizes its text for a phone. Assisted-by: Claude (Opus 5.5 Medium) * ui: tap the haptic engine when a message sends, and once per hold A phone now confirms a sent message by feel, at the moment the send goes through (not on every press of the button), and before any await, so it still runs inside the tap or keypress that iOS needs to play its tick. The hold that opens a row's menu now taps the engine from the long-press hook itself, once: the hook vibrated and the row tapped as well, which buzzed twice on Android. Assisted-by: Claude (Opus 5.5 Medium) * ui: name the gauge dial sizes, the chat form's bottom offset and the sidebar fade Review follow-ups: the context gauge dial reads its grid, radius, stroke and track from one table per size instead of ternaries; the chat form's distance from the screen's bottom per platform and the sidebar content's fade duration are named constants. The viewport debug readout moves out of src, next to the tests, as it is a debug tool the app only loads in a dev build. Assisted-by: Claude (Opus 5.5 Medium) * ui: say why the microphone can't record instead of failing silently A llama-server opened over plain HTTP on the local network or over Tailscale is not a secure context, where browsers hide the microphone, so a tap on the mic did nothing but log to the console. The button now shows a crossed-out mic in the warning tone with the reason in its tooltip, and a tap says it in a toast, as a phone shows no tooltip. A start that fails names the browser's reason (access denied, no microphone, in use by another app) the same way, and the next tap tries again. The recorder passes the browser's error on instead of replacing it with a generic one. Assisted-by: Claude (Opus 5.5 Medium) |
||
|
|
1a97e387d3 |
ui: add conversation compaction (#27401)
* ui: add conversation compaction Add a compaction action that asks the model to summarize the conversation so far and stores the summary in a new compaction node appended to the branch. Later requests slice the branch at the last compaction node, keeping the system prefix and continuing from the summary instead of the full history, which frees up context while the complete history stays visible and navigable in the UI. The slice is applied once at the request funnel, covering the plain send, the agentic flow and the KV cache pre-encode, plus the continue path that bypasses it. The summary request is a one-shot outside the SSE replay machinery, streamed live into the node with a full rollback on abort, error or empty result. The action is exposed as a /compact slash command and a Compact button in the context gauge popup, with an overridable summarization prompt in the settings. * ui: pre-fill KV cache and refresh context gauge after compaction Once the summary is stored, pre-encode the compacted branch and stamp the returned prompt timings on the compaction node: re-encoding the reduced prefix is part of the compaction itself, so the server KV cache and the context gauge reflect the summary right away. The summary stream is registered under a prefixed identity (compact::convId), so the visibility kick and byte-offset resume protect it through tab switches while the reload probe never reattaches it as a chat turn. The stamped node becomes the shared context truth for the gauge and the processing state restore, and the stale live state that kept the gauge full is cleared. * chore: format * ui: allow a dedicated model for conversation compaction An opt-in setting reveals a model selector whose options come from the live router model list. The chosen model writes the summary and is loaded on demand when it is not resident, while the default path keeps resolving to the conversation's own model. * ui: align the compaction model field with project conventions * ui: fix the model option helpers import path The compaction model selector pulls filterModelOptions and groupModelOptions from the models component folder, where they no longer live, so the build fails to resolve the module. Point the import at the navigation folder, which now owns them. Missed during the rebase: the helpers moved in a commit that does not touch any compaction file, so nothing conflicted. * ui: import the model option helpers from models/utils * ui: follow the moved models selector in the compaction model field The models manager moved ModelsSelectorList under ModelsSelector and the model option helpers to /utils, where groupModelOptions takes the options alone. Drop the stale copy the rebase kept and read the helpers from their new home. * ui: drop the dedicated compaction model A summary written by another model loses the prefix the conversation model cached, so the whole history is prefilled again, and the model then resumes from text it did not write. The conversation model always writes its own summary. * ui: keep the last steps of a compacted conversation A compaction now folds the steps the model reads but the last ones, a step being a user message or an assistant message with its tool results, and stores how many it kept on the compaction node. The model then reads the system prefix, the summary, the kept steps and what follows. The summary request is the request the chat sends, with its options, tools and message shaping, cut before the preserved steps: the server reuses the prefix it cached and only the instruction is new. The number of preserved steps is a setting, 10 by default. * ui: run every compaction summary through one path Three callers needed the same thing - the automatic pre-encode pass, the action in the context gauge, and re-running a summary from the block - and each of them had grown its own copy of the request, the streaming and the storing. There is one path now: a summarization owns a node, streams into it, and reports itself through a ledger the rest of the app reads (`isCompacting`, which node belongs to which conversation). Re-running a summary is the same call on an existing node, so the two entry points cannot drift apart again. * ui: give the compaction row its own summary UI The summary was a line of text in a tool-call-shaped collapsible, which is how a compaction reads as a side note rather than as the thing the rest of the conversation now stands on. The row is its own block: a divider that names the boundary, and the summary inside it with the model that wrote it, its statistics, and the same actions an assistant turn has - copy, edit, fork, regenerate and delete all apply to the summary, and it collapses to the divider once a summary is in, because the shrunk context is the headline and the prose is the detail. The divider is a variant of the shared collapsible block, which also needed the toggle and the title split into snippets so a caller can lay them out without copying the markup. The action icons no longer take a role: they render what a message offers, and a compaction offers the same as any other stored message. * ui: report compaction progress on the row The row owns the run, so the row says how it is going: the prompt progress in the header while the context is being read, the phase once the summary starts streaming, and the token count once it is in. Before the first summary token there is nothing to collapse, so the header stands on its own instead of offering an empty block. * ui: keep the summarized turns quiet while a compaction runs The turns being summarized used to keep their own "Processing..." indicator and live reading stats while the summary streamed, so the conversation said the same thing twice in two places. The row reports the run, so the turns it replaces stay silent until it is done. * ui: hand the compact action to the context gauge Compacting is a decision about the context, so the action belongs with the numbers that show the context filling up rather than inside the form: it sits at the bottom of both the hover card and the drawer, under the breakdown it acts on, quiet enough to stay a footnote and disabled - with the row's own spinner - while a summary is already running. * ui: follow the bottom, otherwise leave the view alone The screen scrolled itself with a controller of observers, intervals, direction heuristics and landing timers, and still managed to move the view while the reader was reading: any mutation that grew the branch was treated as a reason to keep following. The page is the scroller, so it follows when the reader sits at the bottom, and stays where it is otherwise. A resize observer plus native scroll anchoring does the rest, and `pointerdown` buys the reader a moment of grace to be caught mid-drag. * ui: expand collapsible bodies with a height transition Expanding a block snapped it open: the body was mounted the moment `open` flipped, so a tall block moved the conversation around it in one frame. The body now goes through the same region the models table uses. The height interpolates and the visibility follows it, so a body is unmounted once the collapse has finished rather than the moment it starts - a closed block still costs nothing while tokens stream past it. * ui: open a compaction summary at the top of the screen Toggling a summary left the reader wherever they were, so a conversation that had just compacted showed the divider at the bottom of the screen and read down from there. A toggle now scrolls the page once and lands the divider a breath under the tabs, both ways: the summary is read from its beginning, and closing it returns to the same boundary instead of wherever the page happens to come to rest. The scroll waits for the body to reach its height, because before that the page is too short to scroll the divider up there and the call would clamp. That wait is the shared collapse duration rather than a transition event: an engine without `interpolate-size` animates the region's grid row instead of its height, so a listener on `height` would never fire there and the page would not move at all. * ui: spin the compaction icon while the summary runs The divider reported the phase in its title while the icon still showed a finished block, so a run in progress and a summary that had landed looked the same in the one place the eye reads first. The icon spins while the summary is running and folds back once it is in. * ui: let the compaction summary speak without the reasoning trimmings The summary is the thing the conversation now stands on, not a note beside it, and the conversation model always writes it, so the body drops the reasoning block's rule and indent (`flushBody` keeps them for the blocks that borrow them) and the model selector under the summary is gone - there is nothing left to swap. * ui: drop the model override from the compaction path The summary row no longer offers a model selector, so nothing hands regenerateCompaction a model anymore. Remove the parameter from the whole path, with the on-demand load of another model it carried: the summary always comes from the model the request funnel resolves. * ui: let the compaction summary think as the chat does The summary request forced thinking off, overriding the reasoning effort the user chose. The summary is the text the conversation resumes from, the task where reasoning helps the most, so the request now carries the very options of the chat. * ui: pre-encode the compacted branch as the next turn reads it The post-compaction pre-encode sent the branch without tools, while the tools render ahead of the messages, so it warmed a prefix the next turn never reads and that turn prefilled the whole compacted context again. The pre-encode now sends the tools, message shaping and reasoning handling of the chat, so the next turn only prefills its new message. * ui: pre-encode the branch the next turn actually reads The per-turn pre-encode sent the messages of the request plus one assistant message holding the streamed text, without tools. With tools on, it replaced the slot the next turn extends with a prefix nobody reads again, and after an agentic turn its history did not match the stored calls and results. Without agentic, it never ran. Both pre-encodes now read the stored branch up to its leaf, cut at the last compaction, and send it with the tools, message shaping and reasoning handling of the chat. The plain completion path triggers it too. * ui: refuse a compaction summary the output limit cut The stream handler read every chunk but dropped the finish reason, so a summary cut by max_tokens folded the conversation into half a text. The handlers now hand the finish reason to onComplete, and a summary that ends on length rolls the compaction back with an error. The summary was framed through a replacement string, so $& or 32560 in it changed the text the model read; it is framed as written now. * ui: wait for the collapse transition in the tool call tests The collapsible body now unmounts once its collapse animation ends rather than as soon as the block closes, so the "folds back" assertions ran before the body was gone. Wait out COLLAPSIBLE_TRANSITION_MS first. Assisted-by: Claude (Opus 5.5 Medium) --------- Co-authored-by: Aleksander Grygier <aleksander.grygier@gmail.com> |
||
|
|
b013e56a71 |
ui : add the models manager (#29583)
* ui : add the drawer, sheet and grouped list primitives Add the drawer and sheet overlay components, the toggle and toggle group, the shared searchable input, the collapsible sections and the grouped list, and the near viewport helper they position with. Assisted-by: pi:llama.cpp/DeepSeek-V4.1-Flash * ui : add the shared model components and data layer Add the model row pieces shared by the selector and the manager, the models store with its download status feed, the huggingface and migration services, and the model utils, enums and constants they read through. Assisted-by: pi:llama.cpp/DeepSeek-V4.1-Flash * ui : rework the models selector around its providers Group the selector components under their own folder, rework the list around the provider grouping, add the mobile trigger and the download item, and derive the selection state in one hook. Assisted-by: pi:llama.cpp/DeepSeek-V4.1-Flash * ui : add the models manager Add the manager table with its repo, quant and status rows, the filters and the toolbar, the row actions in a drawer, the downloads section, the manage models dialog and the stories and tests. Assisted-by: pi:llama.cpp/DeepSeek-V4.1-Flash * ui : rework the chat form actions and the mobile experience Move the add actions into a drawer and a sheet, float the model actions in a bar on a phone, open the context panel in a drawer, and derive the attachment, reasoning and tools menus in hooks. Assisted-by: pi:llama.cpp/DeepSeek-V4.1-Flash * ui : move the mcp servers to the sidebar rail and tidy the dialogs Move the mcp servers dialog to the sidebar rail with its menu entries, even out the dialogs on a phone, and group the mcp and settings stores behind their own modules. Assisted-by: pi:llama.cpp/DeepSeek-V4.1-Flash * ui : polish the shell The secondary button gets its own look back and the chat add button its own light surface. Pressable elements get a pointer cursor again, the font rendering smooths on the app shell, and the agent skills stay out of prettier's way. The root layout props probe rework that came with this polish reads the providers api url and stays with the providers change instead. Assisted-by: pi:llama.cpp/DeepSeek-V4.1-Flash * ui : wrap the model id classes Assisted-by: pi:llama.cpp/DeepSeek-V4.1-Flash * ui : load the model the new chat CTA picks Start a new chat selected the model but left it unloaded, so the chat opened against a server with nothing in memory. Both CTAs share a load helper now. Assisted-by: pi:llama.cpp/DeepSeek-V4.1-Flash * refactor: Post-review fixes |
||
|
|
f1357e4998 |
ui: ESLint config updates (#27700)
* chore: Spacing between sibling elements in html markup * chore: Formatting and linting rules |
||
|
|
521a64cd01 |
ui: Stores split refactor (#27240)
* ui: Extract server stream lifecycle from chatStore into ChatStreamManager
Discovery, attach/replay, resume retry and the remote-running snapshot
formed a cohesive cluster inside chatStore. It now lives in
chat-streams.svelte.ts as ChatStreamManager, owned by chatStore, which
keeps the public entry points as delegates so components are
unchanged. chatStore: 2877 -> 2418 lines.
* ui: Extract user interaction gates from agenticStore into AgenticGates
Tool permission requests, turn-limit continue prompts and queued
steering messages are the state the loop waits on between turns. They
had no coupling to session state, so they now live in
agentic-gates.svelte.ts; agenticStore keeps delegates so components
are unchanged. agenticStore: 1196 -> 1073 lines.
* ui: Compose MCP resources under mcpStore.resources
Resource state was a second import scope next to mcpStore. Consumers
now go through mcpStore.resources, so the MCP surface is one store;
mcp-resources.svelte.ts stays a separate file owned by mcpStore.
* ui: Reorganize stores into domain namespaces
* fix: Update stale doc comments
* ui: Consolidate conv running-state into a chat activity ledger
Running-state was split across chatStore.chatLoadingStates (local
pipes), ChatStreamManager.remoteRunningConvs (backend sessions) and
attachingConvs (attach lifecycle), unioned by hand in
getAllLoadingChats and cross-cleaned by setChatLoading calling
streams.clearRemoteRunning - the 'spinner ghosts until tab toggle'
workaround.
chatActivityStore now owns both sets with one transition per event:
markLocal / localEnded (local pipe end also drops the stale remote
hint, no cross-owner call) / applyRemoteSnapshot (diffed). The
sidebar reads chatStore.activity.loadingConvs through the unchanged
getAllLoadingChats entry point.
Consequences:
- isStreamingActive and its five manual writers are gone; isStreaming()
now reports whether the active conversation has a live streaming
pipe, which is what all four consumers (assistant row, stop action,
context gauge, chat screen) actually check
- isLoading/isReasoning become derived from the per-conv maps plus
the active conversation, dropping the manual resync in
syncLoadingStateForChat and clearUIState
- attachingConvs and the last-attach coordination disappear from
ChatStreamManager
- getAllStreamingChats (no consumers) is removed
* ui: Give store collaborators narrow host interfaces
Collaborators took 'host: typeof <store>', i.e. the store's entire
public surface, which is how chatStore's streamChatCompletion,
createAssistantMessage, getApiOptions and setStreamingActive got
widened to public. Replace with per-collaborator interfaces carrying
only the members each one drives:
- ChatStreamHost (chat/streams) - activity, processing, streaming
states, abort controller, loading/streaming setters
- ChatFlowsHost (chat/flows) - streaming core, message creation,
per-conv state setters
- McpHealthHost (mcp/health) - connection registry + reconnection
- ModelPropsHost / ModelStatusHost (models) - model rows, feed
updates; the managers write modalities/status back onto the host's
rows, so those members stay writable
- ConversationsPreferencesHost (conversations) - the active row and
the conversation list
The store classes now declare 'implements <Host>' so the contract is
visible at the class level, and the 'import type { <store> }' back
references in the collaborators disappear entirely - the host
contract is local to each collaborator file, and collaborators can
no longer reach around their slice. Members stay public (structural
typing), but the collaborator side is now compiler-enforced.
* test: Chat Activity store test
* refactor: Cleanup
* chore: Remove legacy architecture docs
* ui: Memoize findMessageIndex for the streaming hot path
Streaming looks up the same message index on every chunk, a linear
scan of activeMessages each time. Cache the last lookup and reuse it
after validating the id still sits at the same position (O(1)); any
structural change to the array fails validation and falls back to a
full scan.
* ui: Throttle per-chunk stream state writes to localStorage
saveStreamState ran JSON.stringify + a synchronous localStorage.setItem
on every decoded chunk of the stream. The read loop now goes through a
new saveStreamStateThrottled (one write per conversation per 500ms,
latest value held pending); the public saveStreamState keeps its
immediate-write contract for stream start and pre-fetch, and also
resets the throttle window.
A pending offset is force-flushed at resume boundaries (resumeStream
reads the offset back from localStorage), on visibilitychange->hidden
and on pagehide, so a reload always finds a usable offset. The resume
offset only needs to be roughly current since the server retransmits
from a line boundary and the client discards its partial line.
Adds unit tests for the throttled/flush/clear interplay.
* ui: Compute context gauge timing stats in one pass
currentRead/Fresh/Cache/Output were separate deriveds, each running a
full reverse scan of activeMessages for the last assistant timings,
and cumulative ran its own forward scan plus an agentic filter - 4-5
O(n) passes per chunk while streaming. Replace with a single
summarizeAssistantTimings() pass (last assistant timings, last
agentic llm totals and the cumulative sums) feeding a shared derived
snapshot. Semantics unchanged, including the live-stats overrides and
the agentic llm-totals branch.
* agentic : clear session state when a conversation is deleted
Every conversation that ran an agentic flow left an AgenticSession in the
store forever; clearSession was never called. conversationsStore now
notifies deletion listeners and agenticStore drops the matching sessions,
avoiding a circular import back into conversationsStore.
* chat : extract ChatService.normalizeMessagesForApi
The DB->API message normalization (convert + drop empty system messages)
was duplicated in sendMessage, preEncode and the agentic flow. Extract it
into one shared method and call it from all three.
* sse : share record splitting and data extraction
splitSseRecords and extractSseDataPayload centralize the record-boundary
splitting and data: line extraction used by parseSseJsonStream and the
models status feed. chat.service keeps its own line-based parser for
resume support.
* api : delegate apiFetchWithParams to apiFetch
apiFetchWithParams duplicated apiFetch's headers/fetch/error handling
body-for-body; it only differs in URL construction. Build the URL and
delegate.
* chat flows : dedupe title, timings and cleanup handling
- conversationsStore.applyTitleFromContent centralizes the title-from-first-
message logic duplicated in 5 places
- ChatProcessingStore.applyStreamTimings centralizes the onTimings handler
shared by the chat and continue flows
- host.cleanupStreaming centralizes the loading/streaming/processing reset
repeated across the continue flow's exit paths
* conversations : centralize conversation update mirroring
rename, pin, mcp override, reasoning effort and cwd all repeated the same
write-DB-then-mirror-into-list-and-active dance. A single
applyConversationUpdate(id, updates) on the host collapses all five and
removes the forgot-to-mirror-one-field bug class. Drops the redundant
array reassignment in setCwd (deep field assignment is reactive).
* mcp : dedupe tool execution, server parsing and tool indexing
- executeTool delegates to executeToolByName (only diff was argument parsing)
- drop the private #parseServerSettings copy; use parseMcpServerSettings
- cache getServers() keyed on the raw config value (hot path)
- indexServerTools() unifies the three identical toolsIndex rebuild loops
Assisted-by: Claude
* mcp : share cursor pagination and tool indexing
- MCPService.paginate() collapses the identical do-while loops in
listAllResources and listAllResourceTemplates
- promoteHealthCheckToConnection now uses indexServerTools like the other
connect paths
Assisted-by: Claude
* database : share message parent-child bookkeeping
- addChildToParent() dedups the append-to-children update in createMessageBranch
and createSystemMessage
- removeChildFromParent() dedups the remove-from-children cleanup in deleteMessage
and deleteMessageCascading
- bulkAdd the cloned messages when forking a conversation instead of one add
per message
Assisted-by: Claude
* chore: Lint/format
* fix: `pagehide` event from `window`
* refactor: Api Fetch util
* docs : rewrite architecture sections in README
Update the high-level diagram, routes, hooks, stores, services and data
flow tables to match the current UI structure (mcp/settings/search
routes, agentic/tools/mcp stores, MCPService/ToolsService/SandboxService,
/tools API). Fix stale architectural patterns for per-conversation state
and modality validation.
* chore : add ESLint rule for blank lines between accessors
Enforce a blank line between consecutive class accessors. The core
padding-line-between-statements rule does not cover class members, so a
local rule is needed.
* refactor : reorder store members and unify naming
Order store class members as public fields, private fields, constructor,
getters, public methods, then private methods. Normalize private naming
to the `private` keyword (drop `#` and the `_` prefix where there is no
matching public getter). Rename conversationsStore.init() to
initialize() to match the other stores.
* refactor : prefix lookup methods with get in agentic and chat stores
Unify bare-name lookup methods with the get* prefix used across the
other stores (mcp, models, tools, settings). Renames currentTurn,
totalToolCalls, lastError, streamingToolCall, executingToolCallId,
pendingPermissionRequest, pendingContinueRequest,
pendingSteeringMessageContent, pendingSteeringMessageExtras in the
agentic store and pendingMessageContent, pendingMessageExtras in the
chat store. Updates the two consuming components and a doc comment.
* refactor: Clean up comments in stores' and services' code
* chore : add ESLint rule for class member ordering
Enforce structural order (public fields -> private fields -> constructor ->
getters -> setters -> public methods -> private methods) with alphabetical
sorting within each group via perfectionist/sort-classes. Dependency
detection keeps Svelte $derived fields in a valid dependency order instead
of alphabetizing them, since Svelte rejects forward references.
Assisted-by: Claude
* refactor : reorder class members to match new ESLint rule
Apply the sort-classes rule across stores, services, hooks and utils.
Pure reordering - verified no logic changes by comparing sorted line
multisets before/after. All tests and svelte-check pass.
|
||
|
|
fa4ec4590c | refactor: Naming (#27001) | ||
|
|
a6040c925c | refactor: Clean up UI types (#26909) | ||
|
|
92d1bb0c99 | ui: Linting & Formatting scripts (#26819) | ||
|
|
18f7ad7fc9 |
server, ui: only offer a working directory when a tool reads it (#26762)
The working directory chip showed up as soon as the server exposed any builtin tool, so a server started with just get_datetime, or a user who turned every filesystem tool off in the settings, still got a control that nothing would read. Tools now declare whether they resolve their paths and run against the working directory, next to the write permission they already publish in the /tools listing. The WebUI shows the chip and enables the /cwd command only when at least one such tool is both served and left enabled. |
||
|
|
fc6545d322 |
allozaur/feat/chat form contenteditable (#26717)
* feat: Add contenteditable tokenizer for badge/code-chip chat input * feat: Add source-space undo/redo history for the rich input * feat: Split text glued to a closing code fence onto its own line * feat: Add ChatFormContenteditable rich input renderer * feat : wire the contenteditable into ChatForm with auto-switch gating |
||
|
|
6de1b63473 |
allozaur/feat/chat slash commands (#26716)
* base : slash-command/misc foundation - model icon and focus-selector constants * feat : slash-command picker and command parsing helpers * refactor : wire command and @-mention pickers into the chat form * ui : improve model selector keyboard navigation and load/dismiss * feat: Unify markdown/raw-text rendering under one setting with migration * fix: Misc fixes - tool-call subtitle, assistant wrap, progress guards * feat: Clamp and style numeric settings inputs from registry bounds |
||
|
|
23634783c5 |
ui: Filesystem @mentions for Chat Form (#26715)
* base : @-mention picker foundation - glob search, picker nav, highlight * feat : @-mention file/folder picker and mention badges in message bubbles * fix: Imports * feat : wire the @-mention picker into the chat form * fix: Bound the glob-search result cache key and prune stale entries |
||
|
|
555881ebc8 |
ui: reduce per-token render cost when streaming (#26053)
* performance harness - the empirical root Assisted-by: Claude Opus 4.8 * 210.36ms -> 2.67ms per streamed token Assisted-by: Claude Opus 4.8 * 11.58ms -> 0.62ms per streamed token Assisted-by: Claude Opus 4.8 * 22.02ms -> 3.33ms per streamed token Assisted-by: Claude Opus 4.8 * 3.07ms -> 1.36ms per streamed token at 40 messages Assisted-by: Claude Opus 4.8 --------- Co-authored-by: Zach Winter <dmtommy@icloud.com> |
||
|
|
94875285e4 |
ui: Add MCP Servers Opt-In for first time visitors (#25239)
* feat: ui: Add predefined recommended MCP servers to settings * feat: ui: Add MCP server recommendation dialog with custom server support * feat: Auto-focus input fields on mount and dynamic addition * feat: Add header validation to MCP server add and edit forms * feat: Persist recommended MCP server opt-in selections * test: Cover MCP configuration with tests * chore: Format & cleanup * feat: Centralize MCP server overrides to settings config and improve recommendation UI * fix: Capture index before mutation to prevent focus drift * refactor: Extract MCP_CARD_VISIBLE_TOOL_LIMIT to shared constants * refactor: Support arbitrary authorization header schemes * refactor: Consolidate MCP recommendations dismissal into existing storage key * fix: Use case-insensitive comparison for MCP server ID prefix check * refactor: Centralize MCP server visibility logic and extract recommendations hook * refactor: Cleanup |
||
|
|
ef9c13d4c2 |
ui: New Logo + Navigation cleanup & Mobile UI/UX improvements (#24897)
* chore: `npm audit fix --force` * feat: Update sidebar toggle to use Logo * refactor: Clean up favicon SVG * feat: Refactor logo component and implement theme-aware favicon generation * feat: Add configurable padding to generated PWA assets * test: Add unit tests for writeThemeFavicons * refactor: Componentization * feat: WIP * feat: WIP * feat: WIP * feat: Mobile UI * feat: add SEARCH route constant * feat: create SidebarNavigationSearchResults component * refactor: use SidebarNavigationSearchResults in conversation list * feat: enable mobile search navigation in sidebar actions * feat: add mobile search route and page * fix: prevent sidebar overflow on mobile viewports * fix: Mobile sidebar * feat: Mobile Search WIP * feat: Mobile WIP * feat: Add PWA standalone detection and refine mobile UI * feat: Improve mobile layout, sidebar handling, and chat scrolling * feat: Improve mobile sidebar visibility and iOS Safari chat spacing * fix: Disable auto-scroll on mobile * chore: Linting * fix: Wrong condition * feat: Mobile chat scroll * refactor: WIP * fix: Desktop initial scroll always working again * fix: Partial fix for mobile auto-scroll / initial scroll * fix: Desktop auto-scroll on initial load and during streaming * fix: Mobile scrolling logic * refactor: Clean up * feat: Improve start UI * feat: Add `delay` to `fadeInView` * feat: Auto-scroll button * refactor: Cleanup * refactor: Extract chat dialogs and alerts into dedicated component * refactor: Reorganize ChatScreen component structure and initialization * feat: Improve auto-scroll after sending message * feat: UI improvements * fix: Settings link * feat: UI improvements * fix: better UI spacing * fix: Remove unneeded logic * fix: Chat Processing Info UI rendering * feat: Improve mobile UI * feat: UI improvement * fix: Conditional transition delay for Chat Messages based on route from * fix: Delay mobile sidebar collapse for smoother transitions * fix: Mobile scroll down button + sidebar pointer events * fix: Mobile UI * fix: Auto scrolling * fix: Implement dynamic height calculations for chat auto-scroll positioning and UI elements * fix: Retrieve `autofocus` for Chat Form textarea * fix: Use proper class Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * refactor: extract scroll-to-bottom logic and fix message send flow * fix: update viewport store usage and remove conflicting autofocus * feat: add accessibility labels to scroll down button * fix: correct HTML structure in sidebar empty states * fix: dynamically toggle processing info visibility * chore: remove commented exports and fix formatting * fix * fix: Mobile Chat Form Add Action Sheet interactions --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> |
||
|
|
59778f0196 |
ui: Restructure repo to use tools/ui folder and ui / UI / llama-ui / LLAMA_UI naming (#23064)
* webui: Move static build output from `tools/server/public` to `build/ui` directory * refactor: Move to `tools/ui` * refactor: rename CMake variables and preprocessor defines - Rename LLAMA_BUILD_WEBUI -> LLAMA_BUILD_UI (old kept as deprecated) - Rename LLAMA_USE_PREBUILT_WEBUI -> LLAMA_USE_PREBUILT_UI (old kept as deprecated) - Backward compat: old vars auto-forward to new ones with DEPRECATION warning - Rename internal vars: WEBUI_SOURCE -> UI_SOURCE, WEBUI_SOURCE_DIR -> UI_SOURCE_DIR, etc. - Rename HF bucket: LLAMA_WEBUI_HF_BUCKET -> LLAMA_UI_HF_BUCKET - Emit both LLAMA_BUILD_WEBUI and LLAMA_BUILD_UI preprocessor defines - Emit both LLAMA_WEBUI_DEFAULT_ENABLED and LLAMA_UI_DEFAULT_ENABLED * refactor: rename CLI flags (--webui -> --ui) with backward compat - Add --ui/--no-ui (old --webui/--no-webui kept as deprecated aliases) - Add --ui-config (old --webui-config kept as deprecated alias) - Add --ui-config-file (old --webui-config-file kept as deprecated alias) - Add --ui-mcp-proxy/--no-ui-mcp-proxy (old --webui-mcp-proxy kept as deprecated) - Add new env vars: LLAMA_ARG_UI, LLAMA_ARG_UI_CONFIG, LLAMA_ARG_UI_CONFIG_FILE, LLAMA_ARG_UI_MCP_PROXY - C++ struct fields: params.ui, params.ui_config_json, params.ui_mcp_proxy added alongside old fields - Backward compat: old fields synced to new ones in g_params_to_internals * refactor: update C++ server internals with backward compat - Rename json_webui_settings -> json_ui_settings (both kept in server_context_meta) - Rename params.webui usage -> params.ui (both synced, old still works) - JSON API emits both "ui"/"ui_settings" and "webui"/"webui_settings" keys - Server routes use params.ui_mcp_proxy || params.webui_mcp_proxy - Preprocessor guards use #if defined(LLAMA_BUILD_UI) || defined(LLAMA_BUILD_WEBUI) * refactor: rename CI/CD workflows, artifacts, and build script - Rename webui-build.yml -> ui-build.yml; artifact webui-build -> ui-build - Rename webui-publish.yml -> ui-publish.yml; var HF_BUCKET_WEBUI_STATIC_OUTPUT -> HF_BUCKET_UI_STATIC_OUTPUT - Rename server-webui.yml -> server-ui.yml; job webui-build/checks -> ui-build/checks - Update server.yml: job/artifact refs webui-build -> ui-build - Update release.yml: all webui-build/publish refs -> ui-build/publish; HF_TOKEN_WEBUI_STATIC_OUTPUT -> HF_TOKEN_UI_STATIC_OUTPUT - Update server-self-hosted.yml: webui-build -> ui-build - Update build-self-hosted.yml: HF_WEBUI_VERSION -> HF_UI_VERSION - Rename webui-download.cmake -> ui-download.cmake (internal refs updated) - Update labeler.yml: server/webui -> server/ui path label * docs: update CODEOWNERS and server README docs - Update CODEOWNERS: team ggml-org/llama-webui -> ggml-org/llama-ui, path /tools/server/webui/ -> /tools/ui/ - Update server README.md: CLI tables show --ui flags with deprecated --webui aliases - Update server README-dev.md: "WebUI" -> "UI", paths updated to tools/ui/ * fix: Small fixes for UI build * fix: CMake.txt syntax * chore: Formatting * fix: `.editorconfig` for llama-ui * chore: Formatting * refactor: Use `APP_NAME` in Error route * refactor: Cleanup * refactor: Single migration service * make llama-ui a linkable target * fix: UI Build output * fix: Missing change * fix: separate llama-ui npm build output into build/tools/ui/dist subfolder + use cmake npm build instead of downloading ui-build.yml artifacts in CI * refactor: UI workflows cleanup --------- Co-authored-by: Xuan Son Nguyen <son@huggingface.co> |