Skip to content

Glirastes 0.26.0

Choose a tag to compare

@Piwo96 Piwo96 released this 25 Nov 09:06
· 17 commits to main since this release
2c0d7fb

Added

  • glirastes doctor check react-markdown (E-SETUP-109, warning only): a non-test source file imports glirastes/react or glirastes/embed, dependencies are installed (glirastes is found under node_modules from the app folder upwards) and react-markdown is not, so every chat answer would show its raw Markdown source. Offline file lookup, no module resolution: under Yarn Plug'n'Play and before dependencies are installed the check is left out.
  • composer.placeholderOnFocus (ComposerConfig, on AiChatProvider, VercelAiChat and <glirastes-chat>) and the RichMentionInput prop placeholderOnFocus: false hides the placeholder of the pill composer as soon as the editor has focus, the earlier look. Passed on through useChatComposerInput().inputProps.
  • MentionDropdownItemProps.onActivate (optional): a custom @// list item can make its entry the active one itself (as the arrow keys do, without scrolling the list). Call it only on real pointer movement, never on mouseenter/mouseover. Not needed for the usual case, see Changed. The listbox ([data-component="mention-dropdown"]) carries data-active-source="pointer" while the active entry is the one under the pointer, else "keyboard" (arrow keys, new results and any scroll of the list, wheel or trackpad, set it back until the pointer really moves again). composer.pointerActivation (ComposerConfig, on AiChatProvider, VercelAiChat and <glirastes-chat>) and the RichMentionInput prop pointerActivation (default true): false restores the keyboard-only list (no pointer or scroll handling, onActivate does nothing, no data-active-source, no hover look). Passed on through useChatComposerInput().inputProps.

Changed

  • The console warning without react-markdown names the package and no longer recommends npm install.
  • The active entry of the @// completion list (RichMentionInput in mention mode, the default composer with chatInteractions or completionProviders) follows the pointer: real pointer movement (pointermove, or mousemove where no pointer events fire, by at least 1 CSS pixel; the compatibility mouse event of a pointer event is not counted again) over a result or an entity action button makes it the active entry, so isSelected, data-selected, aria-selected and aria-activedescendant move with it and Enter or Tab picks it; arrow keys go on from there. It changed only by keyboard before, so an item with a hover style showed two marked rows and Enter picked the keyboard row. A list that opens, scrolls or re-renders under a resting pointer keeps the keyboard entry (mouseenter/mouseover, a move of less than 1 CSS pixel and the first event after the list opened or its results changed only record the position); touch movement is ignored; pointer activation does not scroll the list. Works for custom components.DropdownItem renderers without a change (found by the optionProps id, else by row order). The built-in stylesheet (also in glirastes/embed) gives list rows and entity action buttons a hover look equal to their selected look, only while data-active-source="pointer" and inside @media (hover: hover); a scroll of the list under a resting pointer sets the source back to keyboard, so the row that scrolled under the pointer is not marked. composer.pointerActivation: false (or pointerActivation={false} on RichMentionInput) restores the earlier behaviour.
  • The placeholder of the pill composer (RichMentionInput in mention mode, the default composer with chatInteractions or completionProviders) stays visible while the empty editor has focus, until text or a pill is in it, like a native placeholder. It disappeared on focus before; composer.placeholderOnFocus: false keeps that.
  • The label line of a direct command (a / command or entity action run without the model) carries mention markers: {{mention:command:<id>:<label>}} for the command and {{mention:<type>:<id>:<label>}} for each picked object, written with the canonical marker writer. The sent message shows them as pills instead of the plain text /Label @Name, and the approval card names an object the user picked instead of warning that no name is known for its id (provenance mention). The type comes from the argument's entity or, for an entity action's target, the action's entity (new optional PendingChatCommand.valueTypes). A value without a picked label, an argument without an entity type, an id with : and an id or type the marker writer refuses stay plain text. The line keeps its 200-character limit and is never cut inside a marker (labels are shortened inside the marker, down to 8 code points; otherwise plain text). It follows mentions.serialize: enabled: false keeps the plain line exactly as before, maxLabelLength bounds the marker labels, labels: 'raw' is not applied (always canonical, a raw label could break the command message). Old messages with a plain line show as before. On later turns the model reads the markers, so it sees the command and object ids as for any mention (it saw them before in the command's tool call). No server change: the wire format and parseChatCommandMessage are unchanged.

Fixed

  • With entityLinks.mentionMarkers: 'markdown' the raw text of an answer (while react-markdown loads, after markdown.loadingTimeoutMs, or without react-markdown) showed the escapes the SDK puts into mention labels: Abstimmung \- Wochenaktion. The raw text now shows the labels as they read; backslashes the answer itself wrote stay. markdownWithMentionMarkers escapes only what can start inline Markdown in a label (\ ` * _ [ ] < | ~) and now also &, so AT&amp;T in a label is no longer read as an entity; - . ( ) ! # + { } > are no longer escaped. Known limit: with remark-gfm a www./https:///e-mail text in a label still becomes a link, as before.
  • After a confirmed direct / command the chat showed the raw tool name: runDirectCommand never sent the tool wording. In a managed turn it now writes the transient data-tool-presentation part ahead of the step, on the fresh command and on its approved continuation, in the same shape as the model path (new option RunDirectCommandOptions.toolPresentation, passed by createAiChatHandler). Without a managed turn there is no wording and no part, as before.
  • createLocalSessionStore named a chat that began with a direct / command after the raw <!--glirastes:command …--> marker. The derived title now drops command and clarification markers and <!-- context: … --> blocks, as the message bubble does, so the visible label line becomes the title. Titles already stored are not changed.
  • The shell's title rule in styles.css (one line with ellipsis, flex: 1, 600 weight) also styled every [data-element="title"] inside the shell: the titles of the command argument form, the chat queue, the session switcher and the pipeline timeline. It now only reaches the header's own title ([data-element="header"] > [data-element="title"], same specificity as before, also in glirastes/embed). A headerTitle that nests its own [data-element="title"] deeper than the header no longer gets that rule.
  • Enter that commits an IME composition (Japanese, Chinese, Korean input) sent the message or picked the selected @// list entry; Tab picked it too. RichMentionInput (plain and mention mode) and the plain chat textarea now leave every key of an open composition to the IME (isComposing, keyCode 229 as Safari fires it after compositionend, or between compositionstart and compositionend).