@aws/mynah-ui 4.39.2 → 4.40.1

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.
@@ -39,6 +39,20 @@ export declare class ChatPromptInput {
39
39
  private quickPickTriggerRange?;
40
40
  private quickPickType;
41
41
  private quickPickItemGroups;
42
+ /**
43
+ * Snapshot of contextCommands taken when the picker opens.
44
+ * Used for sub-menu navigation so that server-side filter responses
45
+ * (which update the store's contextCommands) don't overwrite the
46
+ * base set the user is browsing.
47
+ */
48
+ private baseContextCommands;
49
+ /**
50
+ * When the user clicks into a sub-menu (e.g. @Folders), this holds the
51
+ * `command` string of the parent. The contextCommands store listener
52
+ * uses it to refresh the visible sub-menu's children in place when a
53
+ * fresh fetch returns, instead of snapping back to the top-level menu.
54
+ */
55
+ private activeSubMenuCommand;
42
56
  private topBarTitleClicked;
43
57
  private filteredQuickPickItemGroups;
44
58
  private searchTerm;
@@ -49,6 +63,7 @@ export declare class ChatPromptInput {
49
63
  private userPromptHistoryIndex;
50
64
  private lastUnsentUserPrompt;
51
65
  private readonly markerRemovalRegex;
66
+ private quickPickFilterDebounceTimer;
52
67
  constructor(props: ChatPromptInputProps);
53
68
  private readonly onContextSelectorButtonClick;
54
69
  private readonly updateAvailableCharactersIndicator;
@@ -56,6 +71,19 @@ export declare class ChatPromptInput {
56
71
  private readonly tabBarTitleOverlayKeyPressHandler;
57
72
  private readonly openQuickPick;
58
73
  private readonly handleInputFocus;
74
+ /**
75
+ * Build a top-level skeleton from a previously-rendered context structure:
76
+ * keep all top-level commands (Files / Folders / Code / Prompts / Image, ...)
77
+ * with their metadata (icon, description, command name) so the picker shows
78
+ * the categories immediately, but strip the children to an empty group so
79
+ * stale items from a previous search session don't leak through.
80
+ *
81
+ * Note: this only preserves the FIRST child group of each command. Top-level
82
+ * context commands always ship a single child group, so this is fine in
83
+ * practice. If a command has no children (e.g. @workspace, @image), it is
84
+ * passed through unchanged.
85
+ */
86
+ private readonly buildContextSkeleton;
59
87
  private readonly getQuickPickItemGroups;
60
88
  private readonly handleQuickActionCommandSelection;
61
89
  private readonly handleContextCommandSelection;
@@ -21,6 +21,7 @@ export declare class PromptTextInput {
21
21
  private contextTooltip;
22
22
  private contextTooltipTimeout;
23
23
  private mutationObserver;
24
+ private hasImageCommand;
24
25
  constructor(props: PromptTextInputProps);
25
26
  private readonly setupContextRemovalObserver;
26
27
  private readonly handleContextRemoval;
@@ -43,5 +43,5 @@ export declare class DetailedListWrapper {
43
43
  private readonly setFocus;
44
44
  private readonly setFocusByIndex;
45
45
  readonly getTargetElement: () => DetailedListItem | null;
46
- readonly update: (detailedList: DetailedList, preserveScrollPosition?: boolean) => void;
46
+ readonly update: (detailedList: DetailedList, preserveScrollPosition?: boolean, preserveFocus?: boolean) => void;
47
47
  }
package/dist/main.d.ts CHANGED
@@ -52,6 +52,13 @@ export interface MynahUIProps {
52
52
  onTabChange?: (tabId: string, eventId?: string) => void;
53
53
  onTabAdd?: (tabId: string, eventId?: string) => void;
54
54
  onContextSelected?: (contextItem: QuickActionCommand, tabId: string, eventId?: string) => boolean;
55
+ /**
56
+ * Called when the user types in the `@` context picker.
57
+ * The host should send the search term to the server for filtering
58
+ * and update the store's `contextCommands` with the server response.
59
+ * If not provided, client-side filtering is used as a fallback.
60
+ */
61
+ onContextCommandFilter?: (tabId: string, searchTerm: string) => void;
55
62
  onTabRemove?: (tabId: string, eventId?: string) => void;
56
63
  onSearchShortcut?: (tabId: string, eventId?: string) => void;
57
64
  /**