You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6cd7537
Browse filesBrowse the repository at this point in the historyBrowse files
fix(files): address the paged file reads' second review round
- Only a serve URL is read as a storage key with a query: a stored name or path holding `?` or
`#` is looked up by reference (and by key when it has a `/`), in search-replace and picker
selections alike (`storageKeyOfStoredValue`).
- The `@` menu reads as loading, not "No results", while the file search behind its query is
settling: the mention store carries the picker's pending state alongside the items.
- The Audio and Video filters match any `audio/*` or `video/*` type, as the Type label does, in
SQL and JS for both browsers (`fileKindSql`, `fileBrowserKinds`); the parity test covers types
the MIME table does not list.
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/mention/mention-list.tsx
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/mention/mention-matching.test.ts
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/mention/mention-store.ts
+15-7Lines changed: 15 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -3,29 +3,37 @@ import type { MentionItem } from './types'
3
3
/**
4
4
* A tiny external store bridging React Query data (host component) into the `@` menu list, which is
5
5
* rendered by TipTap's `ReactRenderer` as a detached root with no access to the app's React context
6
-
* providers. The host pushes the latest items via {@link MentionStore.set}; the list subscribes with
6
+
* providers. The host pushes the latest items (and whether the file search is settling) via {@link MentionStore.set}; the list subscribes with
7
7
* `useSyncExternalStore` and re-renders when async data lands — so the menu populates live even if it
8
8
* was opened before the data finished loading. One store instance lives per editor (in extension
9
9
* storage).
10
10
*/
11
11
exportinterfaceMentionStore{
12
-
getSnapshot: ()=>MentionItem[]
12
+
getSnapshot: ()=>MentionMenuData
13
13
subscribe: (listener: ()=>void)=>()=>void
14
-
set: (items: MentionItem[])=>void
14
+
set: (data: MentionMenuData)=>void
15
15
}
16
16
17
+
/** The menu's items, and whether the file search behind them is still settling. */
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/mention/use-editor-mentions.ts
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ export function useEditorMentions(
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/mention/use-markdown-mentions.ts
0 commit comments