@simon_he/vue-tui 1.1.15 → 1.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import { charCellWidth, getPlaneTerminal } from "./create-terminal-Db_-UGVQ.js";
2
2
  import { hasEncodedControl } from "./hyperlink-clbb_ha_.js";
3
3
  import { DialogContextKey, EventZIndexContextKey, ImeAnchorContextKey, LayoutContextKey, RenderPlaneContextKey, RenderStackKey, TInputPluginsContextKey, TerminalContextKey, forEachTextCellSegment, graphemeRangeAt, hasTextWidthAsciiFastPath, intersectRect, repeatChar, sanitizeInlineText, sanitizeTextBlock, sliceByCells, spaces, textCellWidth$1 as textCellWidth, translateRect, useLayout, useRenderNode, useRenderStack, useTerminal, useTerminalNode, useVisibility, withTextWidthProvider } from "./rect-Dfevd15m.js";
4
- import { mergeStyle } from "./linkify-DF96jKWy.js";
4
+ import { mergeStyle } from "./linkify-BDKc1DWZ.js";
5
5
  import { TText, TView } from "./frame-mailbox-6XHw-P8Q.js";
6
6
  import { isAbsolutePath, normalizeNewlines, normalizePath, resolvePath } from "./path-BI9W15Zt.js";
7
7
  import { computed, defineComponent, h, inject, nextTick, onBeforeUnmount, onMounted, provide, ref, shallowReactive, shallowRef, watch, watchEffect } from "vue";
@@ -6021,4 +6021,4 @@ const TSelect = defineComponent({
6021
6021
  });
6022
6022
 
6023
6023
  //#endregion
6024
- export { TBox, TCommandPalette, TDialog, TInput, TRenderPlane, TSelect, clamp$1, computeCommandPaletteMatchRanges, createOverlayFocusStack, isCommitMention, isWhitespace, mentionChipStyle, padEndByCells, resolveOverlayPlacement, sliceByCellsWindow, textCellWidth$1 as textCellWidth };
6024
+ export { TBox, TCommandPalette, TDialog, TInput, TRenderPlane, TSelect, clamp$1 as clamp, computeCommandPaletteMatchRanges, createOverlayFocusStack, isCommitMention, isWhitespace, mentionChipStyle, padEndByCells, resolveOverlayPlacement, sliceByCellsWindow, textCellWidth$1 as textCellWidth };
@@ -2,14 +2,14 @@ import { TERMINAL_RENDER_PLANES, createTerminal, getPlaneTerminal, resetPlaneRow
2
2
  import { sanitizeDomHref } from "./hyperlink-clbb_ha_.js";
3
3
  import { DOM_RENDERER_CAPABILITIES, createDomRenderer } from "./dom-renderer-BfwAEQMf.js";
4
4
  import { EventZIndexContextKey, ImeAnchorContextKey, LayoutContextKey, RenderStackKey, TInputPluginsContextKey, TPathPickerProviderContextKey, TerminalContextKey, VisibilityContextKey, clearTextCaches, forEachTextCellSegment, formatInlineCellLine, injectionKey, intersectRect, normalizeCellRect, padEndByCells$1 as padEndByCells, sanitizeInlineText, sanitizeTextBlock, sliceByCells, sliceByCellsRange, spaces, textCellWidth$1 as textCellWidth, translateRect, useLayout, useRenderNode, useTerminal, useTerminalNode, useVisibility, withTextRenderPass } from "./rect-Dfevd15m.js";
5
- import { TuiThemeContextKey, clamp, createTheme, defaultActiveStyle, defaultDimStyle, fitCellText, linkifyTextSegments, mergeStyle, repeatToCells, tuiDefaultTheme } from "./linkify-DF96jKWy.js";
5
+ import { TuiThemeContextKey, clamp$1 as clamp, createTheme, defaultActiveStyle, defaultDimStyle, fitCellText, linkifyTextSegments, mergeStyle, repeatToCells, tuiDefaultTheme } from "./linkify-BDKc1DWZ.js";
6
6
  import { SUPPRESS_TERMINAL_POINTER_DOWN, SUPPRESS_TERMINAL_POINTER_MOVE, SUPPRESS_TERMINAL_POINTER_UP, createEventManager, createRuntime } from "./runtime-Byf8XXOT.js";
7
7
  import { framePerfNow, mergeFramePerfReason } from "./frame-perf-CHpWhbC4.js";
8
8
  import { createFramePerfStore, createTraceStore } from "./trace-Bh8WnoMo.js";
9
9
  import { envFlag, envString, firstNonEmptyEnv } from "./env-Cl8qmNFN.js";
10
10
  import { createTerminalSelectionController } from "./terminal-selection-4W1SJj4c.js";
11
11
  import { createDebugLogger, isDebugEnabled } from "./debug-logger-CmsGI4of.js";
12
- import { TBox, TInput, TRenderPlane, resolveOverlayPlacement } from "./TSelect-CnBJET_C.js";
12
+ import { TBox, TInput, TRenderPlane, resolveOverlayPlacement } from "./TSelect-BQkGJMKf.js";
13
13
  import { TText, TView, createFrameMailbox } from "./frame-mailbox-6XHw-P8Q.js";
14
14
  import { applyWheelScroll, createWheelScrollState, resetWheelScrollState } from "./wheel-scroll-CQ22Hcyj.js";
15
15
  import { computed, defineComponent, effectScope, getCurrentInstance, h, inject, nextTick, onBeforeUnmount, onMounted, onScopeDispose, onUnmounted, provide, ref, shallowReactive, shallowRef, toRef, watch, watchEffect } from "vue";
package/dist/agent.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import "./create-terminal-Db_-UGVQ.js";
2
2
  import "./hyperlink-clbb_ha_.js";
3
3
  import { forEachTextCellSegment, recordTerminalGraphicTrace, sanitizeInlineText, sanitizeTextBlock, sliceByCells, spaces, textCellWidth$1 as textCellWidth, useTerminal, withTextWidthProvider } from "./rect-Dfevd15m.js";
4
- import "./linkify-DF96jKWy.js";
4
+ import "./linkify-BDKc1DWZ.js";
5
5
  import "./frame-perf-CHpWhbC4.js";
6
6
  import "./env-Cl8qmNFN.js";
7
7
  import "./terminal-selection-4W1SJj4c.js";
8
8
  import "./debug-logger-CmsGI4of.js";
9
- import { TBox, TCommandPalette, TDialog, TInput, TRenderPlane, TSelect, computeCommandPaletteMatchRanges } from "./TSelect-CnBJET_C.js";
9
+ import { TBox, TCommandPalette, TDialog, TInput, TRenderPlane, TSelect, computeCommandPaletteMatchRanges } from "./TSelect-BQkGJMKf.js";
10
10
  import { TText, TView } from "./frame-mailbox-6XHw-P8Q.js";
11
11
  import "./path-BI9W15Zt.js";
12
12
  import "./wheel-scroll-CQ22Hcyj.js";
@@ -14,7 +14,7 @@ import { TMermaid$1 as TMermaid, TMermaidText$1 as TMermaidText, isSimpleMermaid
14
14
  import { createIterm2InlineImageSequence, createKittyDeleteGraphicsSequence, createKittyGraphicsSequence, createKittyPlacementSequence, createTerminalGraphicPngSequence, detectTerminalGraphicsCapabilities, getTerminalGraphicsOutput, getTerminalGraphicsOutputVersion, hashTerminalGraphicsString, isSafeTerminalGraphicsSequence, normalizeTerminalGraphicSize, sanitizeTerminalFallbackText, subscribeTerminalGraphicsOutput } from "./terminal-graphics-DpSL29OQ.js";
15
15
  import { TVirtualMarkdown, createMarkdownBlockSource } from "./block-source-BGTRldY7.js";
16
16
  import "./math-image-CcUpBnW0.js";
17
- import { TLogLinksPanel, TLogMinimap, TLogScrollbar, TLogSearchBar, TLogSearchPager, TLogSearchResults, TLogView, TLogVirtualLinksPanel, TLogVirtualSearchResults, TTranscriptView, TVirtualList, createAppendOnlyLogStore, createTLogDensityBucketsFromMarkers, createTLogLevelPlugin, createTLogLineMatcherPlugin, createTLogLinkActionPlugin, createTLogOsc8LinkPlugin, createTLogUrlPlugin, detectTLogUrls, dispatchTLogPluginLinkAction, getTLogPluginMetadata, parseTLogAnnotatedText, resolveTLogLinksPanelTheme, resolveTLogMinimapTheme, resolveTLogScrollbarTheme, resolveTLogSearchBarTheme, resolveTLogSearchPagerTheme, resolveTLogSearchResultsTheme, resolveTLogViewTheme, stripTLogAnsiText, tlogDarkPreset, tlogDarkTheme, tlogDefaultPreset, tlogDefaultTheme, tlogHighContrastPreset, tlogHighContrastTheme, toTLogExternalLinkFromVisibleLink, useTLogLinkController, useTLogRetainedIndex, useTLogSearchController, useTLogSearchResultsPage, useTLogVirtualSearchResults } from "./tlog-theme-zAInqC2W.js";
17
+ import { TLogLinksPanel, TLogMinimap, TLogScrollbar, TLogSearchBar, TLogSearchPager, TLogSearchResults, TLogView, TLogVirtualLinksPanel, TLogVirtualSearchResults, TTranscriptView, TVirtualList, createAppendOnlyLogStore, createTLogDensityBucketsFromMarkers, createTLogLevelPlugin, createTLogLineMatcherPlugin, createTLogLinkActionPlugin, createTLogOsc8LinkPlugin, createTLogUrlPlugin, detectTLogUrls, dispatchTLogPluginLinkAction, getTLogPluginMetadata, parseTLogAnnotatedText, resolveTLogLinksPanelTheme, resolveTLogMinimapTheme, resolveTLogScrollbarTheme, resolveTLogSearchBarTheme, resolveTLogSearchPagerTheme, resolveTLogSearchResultsTheme, resolveTLogViewTheme, stripTLogAnsiText, tlogDarkPreset, tlogDarkTheme, tlogDefaultPreset, tlogDefaultTheme, tlogHighContrastPreset, tlogHighContrastTheme, toTLogExternalLinkFromVisibleLink, useTLogLinkController, useTLogRetainedIndex, useTLogSearchController, useTLogSearchResultsPage, useTLogVirtualSearchResults } from "./tlog-theme-BgB9yXVS.js";
18
18
  import { TAgentTerminalGraphic } from "./TAgentTerminalGraphic-BKDAoGoE.js";
19
19
  import { computed, defineComponent, h } from "vue";
20
20
 
@@ -1,13 +1,13 @@
1
1
  import "./create-terminal-Db_-UGVQ.js";
2
2
  import { sanitizeTerminalHref } from "./hyperlink-clbb_ha_.js";
3
3
  import { EventZIndexContextKey, forEachTextCellSegment, intersectRect, sanitizeInlineText, sliceByCells, spaces, textCellWidth$1 as textCellWidth, translateRect, useLayout, useRenderNode, useTerminal, useTerminalNode, useVisibility } from "./rect-Dfevd15m.js";
4
- import { mergeStyle } from "./linkify-DF96jKWy.js";
4
+ import { mergeStyle } from "./linkify-BDKc1DWZ.js";
5
5
  import "./frame-perf-CHpWhbC4.js";
6
6
  import "./terminal-selection-4W1SJj4c.js";
7
7
  import { TView } from "./frame-mailbox-6XHw-P8Q.js";
8
8
  import "./wheel-scroll-CQ22Hcyj.js";
9
9
  import "./terminal-graphics-DpSL29OQ.js";
10
- import { TLogLinksPanel, TLogMinimap, TLogScrollbar, TLogSearchBar, TLogSearchPager, TLogSearchResults, TLogView, TLogVirtualLinksPanel, TLogVirtualSearchResults, TTranscriptView, TVirtualList, createAppendOnlyLogStore, createTLogDensityBucketsFromMarkers, createTLogLevelPlugin, createTLogLineMatcherPlugin, createTLogLinkActionPlugin, createTLogOsc8LinkPlugin, createTLogUrlPlugin, detectTLogUrls, dispatchTLogPluginLinkAction, getTLogPluginMetadata, handleTLogKeymapEvent, matchesTLogKeyBinding, parseTLogAnnotatedText, resolveTLogLinksPanelTheme, resolveTLogMinimapTheme, resolveTLogScrollbarTheme, resolveTLogSearchBarTheme, resolveTLogSearchPagerTheme, resolveTLogSearchResultsTheme, resolveTLogViewTheme, stripTLogAnsiText, tlogDarkPreset, tlogDarkTheme, tlogDefaultKeymap, tlogDefaultPreset, tlogDefaultTheme, tlogHighContrastKeymap, tlogHighContrastPreset, tlogHighContrastTheme, toTLogExternalLinkFromVisibleLink, useTLogLinkController, useTLogRetainedIndex, useTLogSearchController, useTLogSearchResultsPage, useTLogVirtualSearchResults } from "./tlog-theme-zAInqC2W.js";
10
+ import { TLogLinksPanel, TLogMinimap, TLogScrollbar, TLogSearchBar, TLogSearchPager, TLogSearchResults, TLogView, TLogVirtualLinksPanel, TLogVirtualSearchResults, TTranscriptView, TVirtualList, createAppendOnlyLogStore, createTLogDensityBucketsFromMarkers, createTLogLevelPlugin, createTLogLineMatcherPlugin, createTLogLinkActionPlugin, createTLogOsc8LinkPlugin, createTLogUrlPlugin, detectTLogUrls, dispatchTLogPluginLinkAction, getTLogPluginMetadata, handleTLogKeymapEvent, matchesTLogKeyBinding, parseTLogAnnotatedText, resolveTLogLinksPanelTheme, resolveTLogMinimapTheme, resolveTLogScrollbarTheme, resolveTLogSearchBarTheme, resolveTLogSearchPagerTheme, resolveTLogSearchResultsTheme, resolveTLogViewTheme, stripTLogAnsiText, tlogDarkPreset, tlogDarkTheme, tlogDefaultKeymap, tlogDefaultPreset, tlogDefaultTheme, tlogHighContrastKeymap, tlogHighContrastPreset, tlogHighContrastTheme, toTLogExternalLinkFromVisibleLink, useTLogLinkController, useTLogRetainedIndex, useTLogSearchController, useTLogSearchResultsPage, useTLogVirtualSearchResults } from "./tlog-theme-BgB9yXVS.js";
11
11
  import "./TAgentTerminalGraphic-BKDAoGoE.js";
12
12
  import { TVideo } from "./TVideo-C3gnTlFD.js";
13
13
  import { computed, defineComponent, h, inject, onBeforeUnmount, onUnmounted, ref, watch } from "vue";
package/dist/index.js CHANGED
@@ -3,15 +3,15 @@ import "./ansi-palette-BHF1rN7R.js";
3
3
  import "./hyperlink-clbb_ha_.js";
4
4
  import { createDomRenderer } from "./dom-renderer-BfwAEQMf.js";
5
5
  import "./rect-Dfevd15m.js";
6
- import { createTheme, linkifyTextSegments, tuiDefaultTheme } from "./linkify-DF96jKWy.js";
6
+ import { createTheme, linkifyTextSegments, tuiDefaultTheme } from "./linkify-BDKc1DWZ.js";
7
7
  import "./runtime-Byf8XXOT.js";
8
8
  import "./frame-perf-CHpWhbC4.js";
9
9
  import "./trace-Bh8WnoMo.js";
10
10
  import "./env-Cl8qmNFN.js";
11
- import { TAutocompleteInput, TBadge, TCheckbox, TCode, TDataTable, TDivider, TFormField, TLink, TLinkifyText, TList, TPasswordInput, TRadioGroup, TSlider, TSwitch, TTable, TTag, TTree, TerminalProvider, createTInputHostPlugin } from "./TTree-DqyzDB0h.js";
11
+ import { TAutocompleteInput, TBadge, TCheckbox, TCode, TDataTable, TDivider, TFormField, TLink, TLinkifyText, TList, TPasswordInput, TRadioGroup, TSlider, TSwitch, TTable, TTag, TTree, TerminalProvider, createTInputHostPlugin } from "./TTree-hjaePulf.js";
12
12
  import "./terminal-selection-4W1SJj4c.js";
13
13
  import "./debug-logger-CmsGI4of.js";
14
- import { TBox, TCommandPalette, TDialog, TInput, TSelect, computeCommandPaletteMatchRanges } from "./TSelect-CnBJET_C.js";
14
+ import { TBox, TCommandPalette, TDialog, TInput, TSelect, computeCommandPaletteMatchRanges } from "./TSelect-BQkGJMKf.js";
15
15
  import { TText, TView } from "./frame-mailbox-6XHw-P8Q.js";
16
16
  import "./path-BI9W15Zt.js";
17
17
  import "./wheel-scroll-CQ22Hcyj.js";
@@ -295,4 +295,4 @@ function linkifyTextSegments(text, options = {}) {
295
295
  }
296
296
 
297
297
  //#endregion
298
- export { TuiThemeContextKey, clamp, createTheme, defaultActiveStyle, defaultDimStyle, fitCellText, linkifyTextSegments, mergeStyle, repeatToCells, tuiDefaultTheme };
298
+ export { TuiThemeContextKey, clamp as clamp$1, createTheme, defaultActiveStyle, defaultDimStyle, fitCellText, linkifyTextSegments, mergeStyle, repeatToCells, tuiDefaultTheme };
@@ -1,7 +1,7 @@
1
1
  import { applyAnsiSgrStyle, parseAnsiSgr } from "./create-terminal-Db_-UGVQ.js";
2
2
  import { sanitizeTerminalHref } from "./hyperlink-clbb_ha_.js";
3
3
  import { EventZIndexContextKey, LayoutContextKey, RenderPlaneContextKey, RenderStackKey, TerminalGraphicsActivityKey, createCombinedTerminalGraphicsActivity, createTerminalGraphicsActivity, forEachTextCellSegment, formatInlineCellLine, intersectRect, normalizeCellRect, padEndByCells$1 as padEndByCells, sanitizeInlineText, sliceByCellsRange, sliceByCellsRangeForSelection, spaces, textCellWidth$1 as textCellWidth, translateRect, useLayout, useRenderNode, useRenderStack, useTerminal, useTerminalNode, useVisibility, wrapByCells } from "./rect-Dfevd15m.js";
4
- import { TuiThemeContextKey, defaultActiveStyle, linkifyTextSegments, tuiDefaultTheme } from "./linkify-DF96jKWy.js";
4
+ import { TuiThemeContextKey, defaultActiveStyle, linkifyTextSegments, tuiDefaultTheme } from "./linkify-BDKc1DWZ.js";
5
5
  import { framePerfNow } from "./frame-perf-CHpWhbC4.js";
6
6
  import { terminalSelectionRowSpans, terminalSelectionVisibleRowSpans } from "./terminal-selection-4W1SJj4c.js";
7
7
  import { TView, createFrameMailbox } from "./frame-mailbox-6XHw-P8Q.js";
@@ -1,8 +1,14 @@
1
+ import type { Style } from "../../../../core/types.js";
1
2
  import type { MentionPathProvider, MentionSuggestionProvider } from "./promptMentionState.js";
2
3
  import type { TInputPlugin } from "./types.js";
3
4
  export type { MentionPathProvider, MentionSuggestionProvider } from "./promptMentionState.js";
4
5
  export type PromptMentionPluginOptions = Readonly<{
5
6
  mentionSuggestionProviders?: readonly MentionSuggestionProvider[];
6
7
  mentionPathProvider?: MentionPathProvider;
8
+ /**
9
+ * Style for the `›` gutter marker drawn on the selected popup row.
10
+ * Called on every paint, so a theme lookup stays live; omit it to keep the popup gutter-free.
11
+ */
12
+ selectedMarkerStyle?: () => Style;
7
13
  }>;
8
14
  export declare function createPromptMentionPlugin(options?: PromptMentionPluginOptions): TInputPlugin;
package/dist/vue.cjs CHANGED
@@ -1798,6 +1798,7 @@ function usePromptMentionState(options) {
1798
1798
  }
1799
1799
 
1800
1800
  // src/vue/components/input/plugins/promptMentionPlugin.ts
1801
+ var SELECTED_ROW_MARKER = "\u203A";
1801
1802
  function omitInverse(style) {
1802
1803
  if (!style)
1803
1804
  return {};
@@ -2081,7 +2082,8 @@ function createPromptMentionPlugin(options = {}) {
2081
2082
  getProps().promptSelectedStyle,
2082
2083
  getProps().zIndex,
2083
2084
  ctx.defaultStyle.value,
2084
- promptMention.mentionKindVersion.value
2085
+ promptMention.mentionKindVersion.value,
2086
+ options.selectedMarkerStyle?.()
2085
2087
  ],
2086
2088
  paint: () => {
2087
2089
  if (!ctx.visible.value || !promptMention.promptVisible.value)
@@ -2111,7 +2113,7 @@ function createPromptMentionPlugin(options = {}) {
2111
2113
  emptyStyle
2112
2114
  }, cacheKey && derivedStyleCache.set(cacheKey, derived);
2113
2115
  }
2114
- let x0 = Math.floor(r.x), y0 = Math.floor(r.y), w = Math.max(0, Math.floor(r.w)), h30 = Math.max(0, Math.floor(r.h)), innerW = Math.max(0, w - 2), sidePad = innerW >= 4 ? 1 : 0, contentW = Math.max(0, innerW - sidePad * 2), contentX = x0 + 1 + sidePad, borderStyle = derived.borderStyle;
2116
+ let x0 = Math.floor(r.x), y0 = Math.floor(r.y), w = Math.max(0, Math.floor(r.w)), h30 = Math.max(0, Math.floor(r.h)), innerW = Math.max(0, w - 2), sidePad = innerW >= 4 ? 1 : 0, markerW = options.selectedMarkerStyle && innerW >= 6 ? 1 : 0, contentW = Math.max(0, innerW - sidePad * 2 - markerW), contentX = x0 + 1 + sidePad + markerW, borderStyle = derived.borderStyle;
2115
2117
  lastTopClampedRect && y0 > 0 && (ctx.terminal.write(spaces(lastTopClampedRect.w), {
2116
2118
  x: lastTopClampedRect.x,
2117
2119
  y: 0,
@@ -2141,7 +2143,7 @@ function createPromptMentionPlugin(options = {}) {
2141
2143
  let match = list[row], isSelected = row === promptMention.promptActiveVisible.value, rawValue = sanitizeInlineText(match.item.value), rawDetail = match.item.detail ? sanitizeInlineText(match.item.detail) : "", highlightRanges = query ? computeHighlightRanges(rawValue, query) : [], valueCells = textCellWidth2(rawValue), detailCells = rawDetail ? textCellWidth2(rawDetail) : 0, availableForDetail = contentW - valueCells - 2;
2142
2144
  if (rawDetail && availableForDetail >= 4) {
2143
2145
  let valueStyle = isSelected ? derived.selectedStyle : derived.itemStyle, highlightStyle = buildPromptMatchHighlightStyle(valueStyle, popupMatchStyle), rowStyle = valueStyle;
2144
- sidePad > 0 && ctx.terminal.write(spaces(sidePad), {
2146
+ sidePad > 0 && ctx.terminal.write(spaces(sidePad + markerW), {
2145
2147
  x: x0 + 1,
2146
2148
  y,
2147
2149
  style: rowStyle
@@ -2173,7 +2175,7 @@ function createPromptMentionPlugin(options = {}) {
2173
2175
  });
2174
2176
  } else {
2175
2177
  let style = isSelected ? derived.selectedStyle : derived.itemStyle, highlightStyle = buildPromptMatchHighlightStyle(style, popupMatchStyle);
2176
- sidePad > 0 && ctx.terminal.write(spaces(sidePad), {
2178
+ sidePad > 0 && ctx.terminal.write(spaces(sidePad + markerW), {
2177
2179
  x: x0 + 1,
2178
2180
  y,
2179
2181
  style
@@ -2198,12 +2200,16 @@ function createPromptMentionPlugin(options = {}) {
2198
2200
  style
2199
2201
  });
2200
2202
  }
2203
+ markerW && isSelected && ctx.terminal.put(x0 + 1, y, SELECTED_ROW_MARKER, {
2204
+ ...derived.selectedStyle,
2205
+ ...options.selectedMarkerStyle?.()
2206
+ });
2201
2207
  }
2202
2208
  if (list.length === 0 && contentH > 0) {
2203
2209
  let y = y0 + 1;
2204
2210
  ctx.terminal.put(x0, y, "\u2502", borderStyle), ctx.terminal.put(x0 + w - 1, y, "\u2502", borderStyle);
2205
2211
  let msg = padEndByCells2(sliceByCellsWindow("(no matches)", 0, contentW), contentW);
2206
- sidePad > 0 && ctx.terminal.write(spaces(sidePad), {
2212
+ sidePad > 0 && ctx.terminal.write(spaces(sidePad + markerW), {
2207
2213
  x: x0 + 1,
2208
2214
  y,
2209
2215
  style: derived.emptyStyle
package/dist/vue.js CHANGED
@@ -3,15 +3,15 @@ import "./ansi-palette-BHF1rN7R.js";
3
3
  import "./hyperlink-clbb_ha_.js";
4
4
  import "./dom-renderer-BfwAEQMf.js";
5
5
  import { EventZIndexContextKey, LayoutContextKey, RenderStackKey, TInputPluginsContextKey, TPathPickerProviderContextKey, VisibilityContextKey, injectionKey, intersectRect, padEndByCells$1 as padEndByCells, repeatChar, sanitizeInlineText, sanitizeTextBlock, sliceByCells, sliceByCellsRange, spaces, textCellWidth$1 as textCellWidth, translateRect, useLayout, useRenderNode, useRenderStack, useTerminal, useTerminalNode, useVisibility, wrapByCells } from "./rect-Dfevd15m.js";
6
- import { clamp, createTheme, fitCellText, linkifyTextSegments, mergeStyle, tuiDefaultTheme } from "./linkify-DF96jKWy.js";
6
+ import { clamp$1 as clamp, createTheme, fitCellText, linkifyTextSegments, mergeStyle, tuiDefaultTheme } from "./linkify-BDKc1DWZ.js";
7
7
  import "./runtime-Byf8XXOT.js";
8
8
  import "./frame-perf-CHpWhbC4.js";
9
9
  import "./trace-Bh8WnoMo.js";
10
10
  import "./env-Cl8qmNFN.js";
11
- import { TAutocompleteInput, TBadge, TCheckbox, TCode, TDataTable, TDivider, TForm, TFormContextKey, TFormField, TLink, TLinkifyText, TList, TPasswordInput, TProgress, TRadioGroup, TSlider, TSpinner, TSwitch, TTable, TTag, TToastViewport, TTree, TerminalProvider, createTInputHostPlugin, useTForm } from "./TTree-DqyzDB0h.js";
11
+ import { TAutocompleteInput, TBadge, TCheckbox, TCode, TDataTable, TDivider, TForm, TFormContextKey, TFormField, TLink, TLinkifyText, TList, TPasswordInput, TProgress, TRadioGroup, TSlider, TSpinner, TSwitch, TTable, TTag, TToastViewport, TTree, TerminalProvider, createTInputHostPlugin, useTForm } from "./TTree-hjaePulf.js";
12
12
  import "./terminal-selection-4W1SJj4c.js";
13
13
  import "./debug-logger-CmsGI4of.js";
14
- import { TBox, TCommandPalette, TDialog, TInput, TRenderPlane, TSelect, clamp$1, computeCommandPaletteMatchRanges, createOverlayFocusStack, isCommitMention, isWhitespace, mentionChipStyle, padEndByCells as padEndByCells$1, resolveOverlayPlacement, sliceByCellsWindow, textCellWidth as textCellWidth$1 } from "./TSelect-CnBJET_C.js";
14
+ import { TBox, TCommandPalette, TDialog, TInput, TRenderPlane, TSelect, clamp as clamp$1, computeCommandPaletteMatchRanges, createOverlayFocusStack, isCommitMention, isWhitespace, mentionChipStyle, padEndByCells as padEndByCells$1, resolveOverlayPlacement, sliceByCellsWindow, textCellWidth as textCellWidth$1 } from "./TSelect-BQkGJMKf.js";
15
15
  import { TText, TView } from "./frame-mailbox-6XHw-P8Q.js";
16
16
  import { normalizePath, stripTrailingSlash } from "./path-BI9W15Zt.js";
17
17
  import { applyWheelScroll, createWheelScrollState } from "./wheel-scroll-CQ22Hcyj.js";
@@ -419,6 +419,7 @@ function usePromptMentionState(options) {
419
419
 
420
420
  //#endregion
421
421
  //#region src/vue/components/input/plugins/promptMentionPlugin.ts
422
+ const SELECTED_ROW_MARKER = "›";
422
423
  function omitInverse(style) {
423
424
  if (!style) return {};
424
425
  const { inverse: _inverse,...rest } = style;
@@ -845,7 +846,8 @@ function createPromptMentionPlugin(options = {}) {
845
846
  getProps().promptSelectedStyle,
846
847
  getProps().zIndex,
847
848
  ctx.defaultStyle.value,
848
- promptMention.mentionKindVersion.value
849
+ promptMention.mentionKindVersion.value,
850
+ options.selectedMarkerStyle?.()
849
851
  ],
850
852
  paint: () => {
851
853
  if (!ctx.visible.value || !promptMention.promptVisible.value) return;
@@ -903,8 +905,9 @@ function createPromptMentionPlugin(options = {}) {
903
905
  const h$1 = Math.max(0, Math.floor(r.h));
904
906
  const innerW = Math.max(0, w - 2);
905
907
  const sidePad = innerW >= 4 ? 1 : 0;
906
- const contentW = Math.max(0, innerW - sidePad * 2);
907
- const contentX = x0 + 1 + sidePad;
908
+ const markerW = options.selectedMarkerStyle && innerW >= 6 ? 1 : 0;
909
+ const contentW = Math.max(0, innerW - sidePad * 2 - markerW);
910
+ const contentX = x0 + 1 + sidePad + markerW;
908
911
  const borderStyle = derived.borderStyle;
909
912
  if (lastTopClampedRect && y0 > 0) {
910
913
  ctx.terminal.write(spaces(lastTopClampedRect.w), {
@@ -964,7 +967,7 @@ function createPromptMentionPlugin(options = {}) {
964
967
  const valueStyle = isSelected ? derived.selectedStyle : derived.itemStyle;
965
968
  const highlightStyle = buildPromptMatchHighlightStyle(valueStyle, popupMatchStyle);
966
969
  const rowStyle = valueStyle;
967
- if (sidePad > 0) ctx.terminal.write(spaces(sidePad), {
970
+ if (sidePad > 0) ctx.terminal.write(spaces(sidePad + markerW), {
968
971
  x: x0 + 1,
969
972
  y,
970
973
  style: rowStyle
@@ -1001,7 +1004,7 @@ function createPromptMentionPlugin(options = {}) {
1001
1004
  } else {
1002
1005
  const style = isSelected ? derived.selectedStyle : derived.itemStyle;
1003
1006
  const highlightStyle = buildPromptMatchHighlightStyle(style, popupMatchStyle);
1004
- if (sidePad > 0) ctx.terminal.write(spaces(sidePad), {
1007
+ if (sidePad > 0) ctx.terminal.write(spaces(sidePad + markerW), {
1005
1008
  x: x0 + 1,
1006
1009
  y,
1007
1010
  style
@@ -1028,13 +1031,17 @@ function createPromptMentionPlugin(options = {}) {
1028
1031
  style
1029
1032
  });
1030
1033
  }
1034
+ if (markerW && isSelected) ctx.terminal.put(x0 + 1, y, SELECTED_ROW_MARKER, {
1035
+ ...derived.selectedStyle,
1036
+ ...options.selectedMarkerStyle?.()
1037
+ });
1031
1038
  }
1032
1039
  if (list.length === 0 && contentH > 0) {
1033
1040
  const y = y0 + 1;
1034
1041
  ctx.terminal.put(x0, y, "│", borderStyle);
1035
1042
  ctx.terminal.put(x0 + w - 1, y, "│", borderStyle);
1036
1043
  const msg = padEndByCells$1(sliceByCellsWindow("(no matches)", 0, contentW), contentW);
1037
- if (sidePad > 0) ctx.terminal.write(spaces(sidePad), {
1044
+ if (sidePad > 0) ctx.terminal.write(spaces(sidePad + markerW), {
1038
1045
  x: x0 + 1,
1039
1046
  y,
1040
1047
  style: derived.emptyStyle
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simon_he/vue-tui",
3
- "version": "1.1.15",
3
+ "version": "1.1.16",
4
4
  "description": "Vue 3 terminal UI components and renderers for browser DOM, CLI stdout, logs, markdown transcripts, and agent consoles",
5
5
  "keywords": [
6
6
  "agent-console",