@peers-app/peers-ui 0.14.0 → 0.15.0
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.
- package/.github/workflows/publish.yml +8 -5
- package/babel.config.js +4 -4
- package/biome.json +191 -0
- package/dist/command-palette/command-palette-ui.d.ts +1 -2
- package/dist/command-palette/command-palette-ui.js +175 -244
- package/dist/command-palette/command-palette.js +65 -64
- package/dist/components/chat-overlay.d.ts +2 -2
- package/dist/components/chat-overlay.js +160 -217
- package/dist/components/checkbox.d.ts +5 -4
- package/dist/components/checkbox.js +4 -7
- package/dist/components/group-switcher.d.ts +1 -2
- package/dist/components/group-switcher.js +119 -159
- package/dist/components/input-date.d.ts +3 -3
- package/dist/components/input-date.js +6 -6
- package/dist/components/input-number.d.ts +7 -6
- package/dist/components/input-number.js +25 -20
- package/dist/components/input.d.ts +5 -4
- package/dist/components/input.js +4 -7
- package/dist/components/inverse-lazy-list.d.ts +3 -3
- package/dist/components/inverse-lazy-list.js +13 -47
- package/dist/components/io-schema-values.d.ts +5 -6
- package/dist/components/io-schema-values.js +28 -65
- package/dist/components/io-schema.d.ts +4 -5
- package/dist/components/io-schema.js +42 -79
- package/dist/components/lazy-list.d.ts +3 -3
- package/dist/components/lazy-list.js +38 -58
- package/dist/components/list-screen.d.ts +3 -8
- package/dist/components/list-screen.js +28 -23
- package/dist/components/loading-indicator.d.ts +1 -2
- package/dist/components/loading-indicator.js +2 -6
- package/dist/components/markdown-editor/autolink-plugin.js +5 -8
- package/dist/components/markdown-editor/editor-inline.d.ts +2 -3
- package/dist/components/markdown-editor/editor-inline.js +2 -6
- package/dist/components/markdown-editor/editor.d.ts +6 -6
- package/dist/components/markdown-editor/editor.js +9 -19
- package/dist/components/markdown-editor/markdown-plugin.d.ts +1 -1
- package/dist/components/markdown-editor/markdown-plugin.js +20 -21
- package/dist/components/markdown-editor/mention-node.d.ts +2 -2
- package/dist/components/markdown-editor/mention-node.js +24 -24
- package/dist/components/markdown-editor/mentions-plugin.d.ts +2 -2
- package/dist/components/markdown-editor/mentions-plugin.js +61 -62
- package/dist/components/markdown-editor/theme.js +28 -28
- package/dist/components/markdown-editor/toolbar.d.ts +2 -3
- package/dist/components/markdown-editor/toolbar.js +32 -49
- package/dist/components/markdown-with-mentions.d.ts +1 -1
- package/dist/components/markdown-with-mentions.js +43 -43
- package/dist/components/message-logs/message-logs.d.ts +1 -2
- package/dist/components/message-logs/message-logs.js +91 -116
- package/dist/components/messages/avatar.d.ts +3 -4
- package/dist/components/messages/avatar.js +37 -46
- package/dist/components/messages/channel-message-list.d.ts +5 -6
- package/dist/components/messages/channel-message-list.js +34 -34
- package/dist/components/messages/channel-view.d.ts +1 -2
- package/dist/components/messages/channel-view.js +23 -57
- package/dist/components/messages/message-compose.d.ts +3 -4
- package/dist/components/messages/message-compose.js +27 -38
- package/dist/components/messages/message-display.d.ts +2 -3
- package/dist/components/messages/message-display.js +42 -95
- package/dist/components/messages/thread-message-list.d.ts +4 -5
- package/dist/components/messages/thread-message-list.js +29 -29
- package/dist/components/router.d.ts +1 -2
- package/dist/components/router.js +58 -66
- package/dist/components/save-button.d.ts +3 -3
- package/dist/components/save-button.js +23 -33
- package/dist/components/sortable-list.d.ts +11 -12
- package/dist/components/sortable-list.js +42 -22
- package/dist/components/tabs.d.ts +3 -3
- package/dist/components/tabs.js +16 -47
- package/dist/components/tooltip.d.ts +4 -4
- package/dist/components/tooltip.js +4 -9
- package/dist/components/trust-level-badge.d.ts +2 -3
- package/dist/components/trust-level-badge.js +16 -16
- package/dist/components/trust-level-dropdown.d.ts +3 -4
- package/dist/components/trust-level-dropdown.js +32 -55
- package/dist/components/typeahead.d.ts +3 -3
- package/dist/components/typeahead.js +48 -89
- package/dist/components/voice-indicator.d.ts +2 -2
- package/dist/components/voice-indicator.js +93 -106
- package/dist/components/voice-subscribe-events.d.ts +32 -0
- package/dist/components/voice-subscribe-events.js +2 -0
- package/dist/globals.d.ts +3 -5
- package/dist/globals.js +22 -33
- package/dist/hooks.d.ts +5 -5
- package/dist/hooks.js +22 -12
- package/dist/hooks.test.js +129 -145
- package/dist/index.d.ts +9 -8
- package/dist/index.js +13 -12
- package/dist/mention-configs.d.ts +2 -2
- package/dist/mention-configs.js +55 -42
- package/dist/screens/assistants/assistant-config.d.ts +2 -3
- package/dist/screens/assistants/assistant-config.js +9 -22
- package/dist/screens/assistants/assistant-details.d.ts +1 -2
- package/dist/screens/assistants/assistant-details.js +13 -28
- package/dist/screens/assistants/assistant-info.d.ts +2 -3
- package/dist/screens/assistants/assistant-info.js +3 -17
- package/dist/screens/assistants/assistant-list.d.ts +1 -2
- package/dist/screens/assistants/assistant-list.js +15 -56
- package/dist/screens/assistants/assistant-tools.d.ts +2 -3
- package/dist/screens/assistants/assistant-tools.js +10 -24
- package/dist/screens/console-logs/console-logs-list.d.ts +1 -2
- package/dist/screens/console-logs/console-logs-list.js +130 -134
- package/dist/screens/console-logs/log-display.d.ts +2 -3
- package/dist/screens/console-logs/log-display.js +40 -42
- package/dist/screens/console-logs/log-filters.d.ts +1 -2
- package/dist/screens/console-logs/log-filters.js +2 -24
- package/dist/screens/console-logs/mobile-log-card.d.ts +2 -3
- package/dist/screens/console-logs/mobile-log-card.js +64 -67
- package/dist/screens/console-logs/resizable-table-header.d.ts +1 -2
- package/dist/screens/console-logs/resizable-table-header.js +31 -67
- package/dist/screens/contacts/contact-details.d.ts +1 -2
- package/dist/screens/contacts/contact-details.js +16 -46
- package/dist/screens/contacts/contact-list.d.ts +1 -2
- package/dist/screens/contacts/contact-list.js +44 -103
- package/dist/screens/contacts/index.d.ts +4 -4
- package/dist/screens/contacts/index.js +1 -1
- package/dist/screens/contacts/user-connect.d.ts +1 -2
- package/dist/screens/contacts/user-connect.js +85 -186
- package/dist/screens/data-explorer/data-explorer.d.ts +1 -2
- package/dist/screens/data-explorer/data-explorer.js +61 -181
- package/dist/screens/data-explorer/index.d.ts +2 -2
- package/dist/screens/data-explorer/query-executor.d.ts +1 -2
- package/dist/screens/data-explorer/query-executor.js +56 -166
- package/dist/screens/groups/group-details.d.ts +1 -2
- package/dist/screens/groups/group-details.js +27 -122
- package/dist/screens/groups/group-invite-listener.d.ts +2 -3
- package/dist/screens/groups/group-invite-listener.js +8 -104
- package/dist/screens/groups/group-list.d.ts +1 -2
- package/dist/screens/groups/group-list.js +56 -133
- package/dist/screens/groups/group-members.d.ts +2 -3
- package/dist/screens/groups/group-members.js +62 -132
- package/dist/screens/groups/index.d.ts +4 -4
- package/dist/screens/groups/index.js +1 -1
- package/dist/screens/join-group/index.d.ts +2 -2
- package/dist/screens/join-group/join-group.d.ts +1 -2
- package/dist/screens/join-group/join-group.js +9 -109
- package/dist/screens/network-viewer/connection-troubleshooter.d.ts +2 -3
- package/dist/screens/network-viewer/connection-troubleshooter.js +89 -193
- package/dist/screens/network-viewer/cpu-usage-graph.d.ts +1 -2
- package/dist/screens/network-viewer/cpu-usage-graph.js +60 -99
- package/dist/screens/network-viewer/device-details-modal.d.ts +1 -2
- package/dist/screens/network-viewer/device-details-modal.js +25 -177
- package/dist/screens/network-viewer/group-details-modal.d.ts +1 -2
- package/dist/screens/network-viewer/group-details-modal.js +31 -142
- package/dist/screens/network-viewer/index.d.ts +4 -4
- package/dist/screens/network-viewer/index.js +3 -3
- package/dist/screens/network-viewer/network-viewer-ipc.d.ts +22 -0
- package/dist/screens/network-viewer/network-viewer-ipc.js +6 -0
- package/dist/screens/network-viewer/network-viewer.d.ts +1 -2
- package/dist/screens/network-viewer/network-viewer.js +91 -296
- package/dist/screens/network-viewer/usage-graph.d.ts +1 -2
- package/dist/screens/network-viewer/usage-graph.js +78 -110
- package/dist/screens/packages/package-details.d.ts +1 -2
- package/dist/screens/packages/package-details.js +35 -41
- package/dist/screens/packages/package-info.d.ts +2 -2
- package/dist/screens/packages/package-info.js +33 -86
- package/dist/screens/packages/package-list.d.ts +1 -2
- package/dist/screens/packages/package-list.js +42 -106
- package/dist/screens/packages/package-new-local.d.ts +1 -2
- package/dist/screens/packages/package-new-local.js +13 -19
- package/dist/screens/packages/package-versions.d.ts +2 -3
- package/dist/screens/packages/package-versions.js +29 -96
- package/dist/screens/peer-types/peer-type-details.d.ts +3 -4
- package/dist/screens/peer-types/peer-type-details.js +26 -78
- package/dist/screens/peer-types/peer-type-list.d.ts +1 -2
- package/dist/screens/peer-types/peer-type-list.js +13 -24
- package/dist/screens/search/global-search.d.ts +1 -2
- package/dist/screens/search/global-search.js +104 -182
- package/dist/screens/settings/color-mode-dropdown.d.ts +3 -4
- package/dist/screens/settings/color-mode-dropdown.js +18 -37
- package/dist/screens/settings/settings-page.d.ts +1 -1
- package/dist/screens/settings/settings-page.js +86 -213
- package/dist/screens/settings/voice-settings-agent.d.ts +1 -1
- package/dist/screens/settings/voice-settings-agent.js +7 -44
- package/dist/screens/settings/voice-settings-api-keys.d.ts +2 -2
- package/dist/screens/settings/voice-settings-api-keys.js +2 -29
- package/dist/screens/settings/voice-settings-output.d.ts +2 -2
- package/dist/screens/settings/voice-settings-output.js +2 -40
- package/dist/screens/settings/voice-settings-providers.d.ts +2 -2
- package/dist/screens/settings/voice-settings-providers.js +2 -19
- package/dist/screens/settings/voice-settings-types.d.ts +4 -4
- package/dist/screens/settings/voice-settings-types.js +31 -31
- package/dist/screens/settings/voice-settings-wake-word.d.ts +2 -2
- package/dist/screens/settings/voice-settings-wake-word.js +2 -33
- package/dist/screens/settings/voice-settings.d.ts +1 -1
- package/dist/screens/settings/voice-settings.js +35 -112
- package/dist/screens/setup-user.d.ts +1 -2
- package/dist/screens/setup-user.js +38 -116
- package/dist/screens/tools/tool-code.d.ts +2 -3
- package/dist/screens/tools/tool-code.js +9 -13
- package/dist/screens/tools/tool-details.d.ts +1 -2
- package/dist/screens/tools/tool-details.js +26 -39
- package/dist/screens/tools/tool-info.d.ts +2 -3
- package/dist/screens/tools/tool-info.js +9 -48
- package/dist/screens/tools/tool-list.d.ts +1 -2
- package/dist/screens/tools/tool-list.js +33 -65
- package/dist/screens/tools/tool-schema.d.ts +2 -3
- package/dist/screens/tools/tool-schema.js +2 -13
- package/dist/screens/tools/tool-test-details.d.ts +1 -2
- package/dist/screens/tools/tool-test-details.js +12 -28
- package/dist/screens/tools/tool-test-list.d.ts +1 -2
- package/dist/screens/tools/tool-test-list.js +17 -56
- package/dist/screens/variables/variable-details.d.ts +1 -2
- package/dist/screens/variables/variable-details.js +19 -86
- package/dist/screens/variables/variable-list.d.ts +1 -2
- package/dist/screens/variables/variable-list.js +16 -27
- package/dist/screens/welcome-modal.d.ts +1 -2
- package/dist/screens/welcome-modal.js +44 -111
- package/dist/screens/workflows/workflow-details.d.ts +1 -2
- package/dist/screens/workflows/workflow-details.js +17 -31
- package/dist/screens/workflows/workflow-info.d.ts +2 -3
- package/dist/screens/workflows/workflow-info.js +2 -9
- package/dist/screens/workflows/workflow-instructions.d.ts +2 -3
- package/dist/screens/workflows/workflow-instructions.js +23 -55
- package/dist/screens/workflows/workflow-list.d.ts +1 -2
- package/dist/screens/workflows/workflow-list.js +23 -62
- package/dist/setupTests.d.ts +1 -1
- package/dist/setupTests.js +10 -11
- package/dist/system-apps/assistants.app.d.ts +1 -1
- package/dist/system-apps/assistants.app.js +3 -3
- package/dist/system-apps/console-logs.app.d.ts +1 -1
- package/dist/system-apps/console-logs.app.js +3 -3
- package/dist/system-apps/contacts.app.d.ts +1 -1
- package/dist/system-apps/contacts.app.js +4 -4
- package/dist/system-apps/data-explorer.app.d.ts +1 -1
- package/dist/system-apps/data-explorer.app.js +4 -4
- package/dist/system-apps/groups.app.d.ts +1 -1
- package/dist/system-apps/groups.app.js +4 -4
- package/dist/system-apps/index.d.ts +17 -17
- package/dist/system-apps/index.js +52 -52
- package/dist/system-apps/join-group.app.d.ts +1 -1
- package/dist/system-apps/join-group.app.js +4 -4
- package/dist/system-apps/mobile-settings.app.d.ts +1 -1
- package/dist/system-apps/mobile-settings.app.js +3 -3
- package/dist/system-apps/network-viewer.app.d.ts +1 -1
- package/dist/system-apps/network-viewer.app.js +4 -4
- package/dist/system-apps/packages.app.d.ts +1 -1
- package/dist/system-apps/packages.app.js +3 -3
- package/dist/system-apps/search.app.d.ts +1 -1
- package/dist/system-apps/search.app.js +4 -4
- package/dist/system-apps/settings.app.d.ts +1 -1
- package/dist/system-apps/settings.app.js +3 -3
- package/dist/system-apps/threads.app.d.ts +1 -1
- package/dist/system-apps/threads.app.js +3 -3
- package/dist/system-apps/tools.app.d.ts +1 -1
- package/dist/system-apps/tools.app.js +3 -3
- package/dist/system-apps/types.app.d.ts +1 -1
- package/dist/system-apps/types.app.js +3 -3
- package/dist/system-apps/variables.app.d.ts +1 -1
- package/dist/system-apps/variables.app.js +3 -3
- package/dist/system-apps/workflows.app.d.ts +1 -1
- package/dist/system-apps/workflows.app.js +3 -3
- package/dist/tabs-layout/tabs-layout.d.ts +2 -3
- package/dist/tabs-layout/tabs-layout.js +215 -246
- package/dist/tabs-layout/tabs-state.d.ts +2 -2
- package/dist/tabs-layout/tabs-state.js +73 -61
- package/dist/ui-defaults/index.d.ts +2 -2
- package/dist/ui-defaults/list-screen.d.ts +2 -3
- package/dist/ui-defaults/list-screen.js +33 -37
- package/dist/ui-defaults/markdown-field.js +24 -56
- package/dist/ui-router/routes-loader.d.ts +1 -1
- package/dist/ui-router/routes-loader.js +17 -13
- package/dist/ui-router/ui-loader.d.ts +6 -6
- package/dist/ui-router/ui-loader.js +172 -268
- package/dist/utils.js +49 -39
- package/jest.config.js +16 -16
- package/package.json +16 -14
- package/src/command-palette/command-palette-ui.tsx +261 -237
- package/src/command-palette/command-palette.ts +81 -78
- package/src/components/chat-overlay.tsx +366 -261
- package/src/components/checkbox.tsx +15 -12
- package/src/components/group-switcher.tsx +150 -105
- package/src/components/input-date.tsx +17 -16
- package/src/components/input-number.tsx +47 -31
- package/src/components/input.tsx +15 -12
- package/src/components/inverse-lazy-list.tsx +14 -13
- package/src/components/io-schema-values.tsx +51 -69
- package/src/components/io-schema.tsx +94 -69
- package/src/components/lazy-list.tsx +51 -34
- package/src/components/list-screen.tsx +51 -35
- package/src/components/loading-indicator.tsx +2 -4
- package/src/components/markdown-editor/autolink-plugin.tsx +4 -11
- package/src/components/markdown-editor/editor-inline.tsx +3 -4
- package/src/components/markdown-editor/editor.tsx +53 -51
- package/src/components/markdown-editor/markdown-plugin.tsx +48 -40
- package/src/components/markdown-editor/mention-node.ts +39 -38
- package/src/components/markdown-editor/mentions-plugin.tsx +99 -101
- package/src/components/markdown-editor/theme.ts +28 -29
- package/src/components/markdown-editor/toolbar.tsx +53 -47
- package/src/components/markdown-with-mentions.tsx +56 -46
- package/src/components/message-logs/message-logs.tsx +225 -165
- package/src/components/messages/avatar.tsx +70 -52
- package/src/components/messages/channel-message-list.tsx +80 -68
- package/src/components/messages/channel-view.tsx +34 -33
- package/src/components/messages/message-compose.tsx +84 -67
- package/src/components/messages/message-display.tsx +103 -89
- package/src/components/messages/thread-message-list.tsx +53 -44
- package/src/components/router.tsx +42 -43
- package/src/components/save-button.tsx +43 -39
- package/src/components/sortable-list.tsx +77 -49
- package/src/components/tabs.tsx +31 -31
- package/src/components/tooltip.tsx +21 -28
- package/src/components/trust-level-badge.tsx +15 -11
- package/src/components/trust-level-dropdown.tsx +49 -19
- package/src/components/typeahead.tsx +57 -59
- package/src/components/voice-indicator.tsx +158 -141
- package/src/components/voice-subscribe-events.ts +20 -0
- package/src/globals.tsx +42 -40
- package/src/hooks.test.tsx +141 -134
- package/src/hooks.ts +80 -48
- package/src/index.tsx +17 -10
- package/src/mention-configs.ts +122 -68
- package/src/screens/assistants/assistant-config.tsx +28 -18
- package/src/screens/assistants/assistant-details.tsx +35 -36
- package/src/screens/assistants/assistant-info.tsx +16 -11
- package/src/screens/assistants/assistant-list.tsx +37 -34
- package/src/screens/assistants/assistant-tools.tsx +41 -20
- package/src/screens/console-logs/console-logs-list.tsx +173 -140
- package/src/screens/console-logs/log-display.tsx +65 -38
- package/src/screens/console-logs/log-filters.tsx +4 -3
- package/src/screens/console-logs/mobile-log-card.tsx +78 -71
- package/src/screens/console-logs/resizable-table-header.tsx +29 -21
- package/src/screens/contacts/contact-details.tsx +29 -30
- package/src/screens/contacts/contact-list.tsx +71 -60
- package/src/screens/contacts/index.ts +5 -5
- package/src/screens/contacts/user-connect.tsx +177 -171
- package/src/screens/data-explorer/data-explorer.tsx +134 -98
- package/src/screens/data-explorer/index.ts +2 -3
- package/src/screens/data-explorer/query-executor.tsx +90 -80
- package/src/screens/groups/group-details.tsx +120 -101
- package/src/screens/groups/group-invite-listener.tsx +34 -37
- package/src/screens/groups/group-list.tsx +119 -103
- package/src/screens/groups/group-members.tsx +225 -164
- package/src/screens/groups/index.ts +5 -6
- package/src/screens/join-group/index.ts +2 -2
- package/src/screens/join-group/join-group.tsx +41 -39
- package/src/screens/network-viewer/connection-troubleshooter.tsx +145 -104
- package/src/screens/network-viewer/cpu-usage-graph.tsx +39 -43
- package/src/screens/network-viewer/device-details-modal.tsx +46 -59
- package/src/screens/network-viewer/group-details-modal.tsx +68 -49
- package/src/screens/network-viewer/index.ts +4 -5
- package/src/screens/network-viewer/network-viewer-ipc.ts +23 -0
- package/src/screens/network-viewer/network-viewer.tsx +261 -236
- package/src/screens/network-viewer/usage-graph.tsx +57 -49
- package/src/screens/packages/package-details.tsx +43 -35
- package/src/screens/packages/package-info.tsx +107 -66
- package/src/screens/packages/package-list.tsx +175 -98
- package/src/screens/packages/package-new-local.tsx +28 -26
- package/src/screens/packages/package-versions.tsx +102 -77
- package/src/screens/peer-types/peer-type-details.tsx +60 -50
- package/src/screens/peer-types/peer-type-list.tsx +20 -30
- package/src/screens/search/global-search.tsx +153 -137
- package/src/screens/settings/color-mode-dropdown.tsx +52 -35
- package/src/screens/settings/settings-page.tsx +215 -141
- package/src/screens/settings/voice-settings-agent.tsx +13 -12
- package/src/screens/settings/voice-settings-api-keys.tsx +14 -12
- package/src/screens/settings/voice-settings-output.tsx +12 -11
- package/src/screens/settings/voice-settings-providers.tsx +7 -3
- package/src/screens/settings/voice-settings-types.ts +52 -49
- package/src/screens/settings/voice-settings-wake-word.tsx +25 -9
- package/src/screens/settings/voice-settings.tsx +66 -43
- package/src/screens/setup-user.tsx +88 -41
- package/src/screens/tools/tool-code.tsx +12 -17
- package/src/screens/tools/tool-details.tsx +28 -28
- package/src/screens/tools/tool-info.tsx +14 -19
- package/src/screens/tools/tool-list.tsx +58 -40
- package/src/screens/tools/tool-schema.tsx +16 -9
- package/src/screens/tools/tool-test-details.tsx +11 -22
- package/src/screens/tools/tool-test-list.tsx +29 -30
- package/src/screens/variables/variable-details.tsx +63 -51
- package/src/screens/variables/variable-list.tsx +29 -30
- package/src/screens/welcome-modal.tsx +68 -48
- package/src/screens/workflows/workflow-details.tsx +40 -30
- package/src/screens/workflows/workflow-info.tsx +4 -11
- package/src/screens/workflows/workflow-instructions.tsx +35 -28
- package/src/screens/workflows/workflow-list.tsx +50 -40
- package/src/setupTests.ts +14 -13
- package/src/system-apps/assistants.app.ts +5 -5
- package/src/system-apps/console-logs.app.ts +4 -4
- package/src/system-apps/contacts.app.ts +6 -6
- package/src/system-apps/data-explorer.app.ts +5 -5
- package/src/system-apps/groups.app.ts +6 -6
- package/src/system-apps/index.ts +49 -49
- package/src/system-apps/join-group.app.ts +5 -5
- package/src/system-apps/mobile-settings.app.ts +4 -5
- package/src/system-apps/network-viewer.app.ts +5 -5
- package/src/system-apps/packages.app.ts +5 -5
- package/src/system-apps/search.app.ts +6 -6
- package/src/system-apps/settings.app.ts +5 -5
- package/src/system-apps/threads.app.ts +5 -5
- package/src/system-apps/tools.app.ts +5 -5
- package/src/system-apps/types.app.ts +5 -5
- package/src/system-apps/variables.app.ts +5 -5
- package/src/system-apps/workflows.app.ts +5 -5
- package/src/tabs-layout/tabs-layout.tsx +345 -254
- package/src/tabs-layout/tabs-state.ts +100 -81
- package/src/ui-defaults/index.ts +2 -3
- package/src/ui-defaults/list-screen.tsx +45 -40
- package/src/ui-defaults/markdown-field.tsx +22 -26
- package/src/ui-router/routes-loader.ts +40 -24
- package/src/ui-router/ui-loader.tsx +312 -214
- package/src/utils.ts +68 -81
- package/tsconfig.json +5 -10
- package/dist/components/input-datetime.d.ts +0 -7
- package/dist/components/input-datetime.js +0 -35
- package/dist/components/lazy-sortable-list.d.ts +0 -29
- package/dist/components/lazy-sortable-list.js +0 -12
- package/dist/components/left-bar.d.ts +0 -5
- package/dist/components/left-bar.js +0 -207
- package/dist/components/main-content-container.d.ts +0 -2
- package/dist/components/main-content-container.js +0 -92
- package/dist/components/messages/thread-view.d.ts +0 -6
- package/dist/components/messages/thread-view.js +0 -174
- package/dist/components/off-canvas.d.ts +0 -13
- package/dist/components/off-canvas.js +0 -89
- package/dist/components/text-list-editor.tsx/text-list-editor.d.ts +0 -6
- package/dist/components/text-list-editor.tsx/text-list-editor.js +0 -13
- package/dist/components/top-bar.d.ts +0 -2
- package/dist/components/top-bar.js +0 -51
- package/dist/components/typeahead/mentions-plugin.d.ts +0 -7
- package/dist/components/typeahead/mentions-plugin.js +0 -203
- package/dist/components/typeahead/typeahead-editor.d.ts +0 -15
- package/dist/components/typeahead/typeahead-editor.js +0 -134
- package/dist/components/typeahead/typeahead.d.ts +0 -12
- package/dist/components/typeahead/typeahead.js +0 -94
- package/dist/screens/profile.d.ts +0 -2
- package/dist/screens/profile.js +0 -76
- package/src/components/input-datetime.tsx +0 -41
- package/src/components/lazy-sortable-list.tsx +0 -51
- package/src/components/left-bar.tsx +0 -322
- package/src/components/main-content-container.tsx +0 -79
- package/src/components/messages/thread-view.tsx +0 -214
- package/src/components/off-canvas.tsx +0 -83
- package/src/components/text-list-editor.tsx/text-list-editor.tsx +0 -13
- package/src/components/top-bar.tsx +0 -119
- package/src/components/typeahead/mentions-plugin.tsx +0 -265
- package/src/components/typeahead/typeahead-editor.tsx +0 -140
- package/src/components/typeahead/typeahead.tsx +0 -77
- package/src/screens/profile.tsx +0 -75
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
type IDoc,
|
|
3
|
+
type IOSchema,
|
|
4
|
+
IOSchemaType,
|
|
5
|
+
type ITool,
|
|
6
|
+
type Observable,
|
|
7
|
+
} from "@peers-app/peers-sdk";
|
|
3
8
|
import { IOSchemaEditor } from "../../components/io-schema";
|
|
4
9
|
import { useObservable } from "../../hooks";
|
|
5
10
|
|
|
@@ -19,24 +24,26 @@ export const ToolSchema = (props: { tool: IDoc<ITool> }) => {
|
|
|
19
24
|
<div>
|
|
20
25
|
{tool.isAssistantRunner && (
|
|
21
26
|
<>
|
|
22
|
-
<span style={{ width:
|
|
27
|
+
<span style={{ width: "130px", display: "inline-block" }} className="fw-bold">
|
|
23
28
|
Config Schema:
|
|
24
29
|
</span>
|
|
25
|
-
<IOSchemaEditor
|
|
30
|
+
<IOSchemaEditor
|
|
31
|
+
ioSchema={tool.qs.configSchema as Observable<IOSchema>}
|
|
32
|
+
simpleValueName="input"
|
|
33
|
+
/>
|
|
26
34
|
<br />
|
|
27
35
|
</>
|
|
28
36
|
)}
|
|
29
37
|
|
|
30
|
-
<span style={{ width:
|
|
38
|
+
<span style={{ width: "130px", display: "inline-block" }} className="fw-bold">
|
|
31
39
|
Input Schema:
|
|
32
40
|
</span>
|
|
33
41
|
<IOSchemaEditor ioSchema={tool.qs.inputSchema} simpleValueName="input" />
|
|
34
42
|
|
|
35
|
-
<span style={{ width:
|
|
43
|
+
<span style={{ width: "130px", display: "inline-block" }} className="mt-4 fw-bold">
|
|
36
44
|
Output Schema:
|
|
37
|
-
|
|
38
45
|
</span>
|
|
39
46
|
<IOSchemaEditor ioSchema={tool.qs.outputSchema} simpleValueName="output" />
|
|
40
47
|
</div>
|
|
41
|
-
)
|
|
42
|
-
}
|
|
48
|
+
);
|
|
49
|
+
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { ToolTests, ITool, Tools } from "@peers-app/peers-sdk";
|
|
1
|
+
import { type ITool, Tools, ToolTests } from "@peers-app/peers-sdk";
|
|
2
|
+
import { LoadingIndicator } from "../../components/loading-indicator";
|
|
4
3
|
import { MarkdownEditor } from "../../components/markdown-editor/editor";
|
|
5
4
|
import { SaveButton } from "../../components/save-button";
|
|
6
|
-
import {
|
|
5
|
+
import { useObservableState, usePromise } from "../../hooks";
|
|
7
6
|
import { updateActiveTabTitle } from "../../tabs-layout/tabs-state";
|
|
8
7
|
|
|
9
8
|
export const ToolTestDetails = (props: { toolTestId: string }) => {
|
|
@@ -38,20 +37,15 @@ export const ToolTestDetails = (props: { toolTestId: string }) => {
|
|
|
38
37
|
</div>
|
|
39
38
|
</div>
|
|
40
39
|
|
|
41
|
-
<div
|
|
42
|
-
style={{ height: 'calc(100vh - 55px)', overflowY: 'auto', width: '100%' }}
|
|
43
|
-
>
|
|
40
|
+
<div style={{ height: "calc(100vh - 55px)", overflowY: "auto", width: "100%" }}>
|
|
44
41
|
<small>Test description:</small>
|
|
45
42
|
<div
|
|
46
43
|
style={{
|
|
47
|
-
border:
|
|
48
|
-
borderRadius:
|
|
44
|
+
border: "1px solid #ccc",
|
|
45
|
+
borderRadius: "5px",
|
|
49
46
|
}}
|
|
50
47
|
>
|
|
51
|
-
<MarkdownEditor
|
|
52
|
-
value={toolTest.qs.description}
|
|
53
|
-
hideToolbar={true}
|
|
54
|
-
/>
|
|
48
|
+
<MarkdownEditor value={toolTest.qs.description} hideToolbar={true} />
|
|
55
49
|
</div>
|
|
56
50
|
|
|
57
51
|
{/* <small>Input:</small>
|
|
@@ -83,18 +77,13 @@ export const ToolTestDetails = (props: { toolTestId: string }) => {
|
|
|
83
77
|
<small>Code:</small>
|
|
84
78
|
<div
|
|
85
79
|
style={{
|
|
86
|
-
border:
|
|
87
|
-
borderRadius:
|
|
80
|
+
border: "1px solid #ccc",
|
|
81
|
+
borderRadius: "5px",
|
|
88
82
|
}}
|
|
89
83
|
>
|
|
90
|
-
<MarkdownEditor
|
|
91
|
-
value={toolTest.qs.code}
|
|
92
|
-
hideToolbar={true}
|
|
93
|
-
/>
|
|
84
|
+
<MarkdownEditor value={toolTest.qs.code} hideToolbar={true} />
|
|
94
85
|
</div>
|
|
95
|
-
|
|
96
|
-
|
|
97
86
|
</div>
|
|
98
87
|
</div>
|
|
99
88
|
);
|
|
100
|
-
}
|
|
89
|
+
};
|
|
@@ -1,74 +1,73 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { type IToolTest, newid, ToolTests } from "@peers-app/peers-sdk";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import { useEffect } from "react";
|
|
4
|
+
import { Input } from "../../components/input";
|
|
5
|
+
import { mainContentPath } from "../../globals";
|
|
6
|
+
import { useObservableState } from "../../hooks";
|
|
7
7
|
|
|
8
8
|
export const ToolTestList = (props: { toolId: string }) => {
|
|
9
9
|
const { toolId } = props;
|
|
10
10
|
|
|
11
11
|
const testsObs = useObservableState<IToolTest[]>([]);
|
|
12
|
-
const searchText = useObservableState<string>(
|
|
12
|
+
const searchText = useObservableState<string>("");
|
|
13
13
|
|
|
14
14
|
useEffect(() => {
|
|
15
|
-
ToolTests()
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
ToolTests()
|
|
16
|
+
.list({ toolId })
|
|
17
|
+
.then((tests) => {
|
|
18
|
+
testsObs(tests);
|
|
19
|
+
});
|
|
20
|
+
}, [toolId, testsObs]);
|
|
19
21
|
|
|
20
|
-
const tests = testsObs().filter(test =>
|
|
22
|
+
const tests = testsObs().filter((test) =>
|
|
23
|
+
test.description.toLowerCase().includes(searchText().toLowerCase()),
|
|
24
|
+
);
|
|
21
25
|
|
|
22
26
|
async function createTest(evt: React.KeyboardEvent<HTMLInputElement>) {
|
|
23
27
|
if (evt.key !== "Enter") return;
|
|
24
28
|
evt.preventDefault();
|
|
25
|
-
// TODO maybe use LLM call to do this?
|
|
29
|
+
// TODO maybe use LLM call to do this?
|
|
26
30
|
const test = await ToolTests().insert({
|
|
27
31
|
toolTestId: newid(),
|
|
28
32
|
toolId,
|
|
29
33
|
description: searchText(),
|
|
30
|
-
code:
|
|
34
|
+
code: "",
|
|
31
35
|
input: {},
|
|
32
36
|
output: {},
|
|
33
37
|
});
|
|
34
|
-
testsObs([
|
|
35
|
-
|
|
36
|
-
test
|
|
37
|
-
]);
|
|
38
|
-
searchText('');
|
|
38
|
+
testsObs([...tests, test]);
|
|
39
|
+
searchText("");
|
|
39
40
|
mainContentPath(`tools/tests/${test.toolTestId}`);
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
return (
|
|
43
44
|
<div>
|
|
44
|
-
|
|
45
45
|
<Input
|
|
46
|
-
className=
|
|
46
|
+
className="form-control mb-2"
|
|
47
47
|
value={searchText}
|
|
48
48
|
onKeyDown={createTest}
|
|
49
|
-
placeholder=
|
|
49
|
+
placeholder="Search or create new test"
|
|
50
50
|
/>
|
|
51
51
|
|
|
52
52
|
{testsObs().length === 0 && (
|
|
53
|
-
<div className=
|
|
53
|
+
<div className="text-center">
|
|
54
54
|
<p>No test for this tool yet</p>
|
|
55
55
|
</div>
|
|
56
56
|
)}
|
|
57
57
|
|
|
58
58
|
{testsObs().length !== 0 && tests.length === 0 && (
|
|
59
|
-
<div className=
|
|
59
|
+
<div className="text-center">
|
|
60
60
|
<p>No matching tests found</p>
|
|
61
61
|
</div>
|
|
62
62
|
)}
|
|
63
63
|
|
|
64
64
|
{tests.map((test, iTest) => {
|
|
65
65
|
return (
|
|
66
|
-
<p key={iTest} onDoubleClick={
|
|
67
|
-
{test.description.split(
|
|
66
|
+
<p key={iTest} onDoubleClick={(_e) => mainContentPath(`tools/tests/${test.toolTestId}`)}>
|
|
67
|
+
{test.description.split("\n")[0]}
|
|
68
68
|
</p>
|
|
69
|
-
)
|
|
69
|
+
);
|
|
70
70
|
})}
|
|
71
|
-
|
|
72
71
|
</div>
|
|
73
|
-
)
|
|
74
|
-
}
|
|
72
|
+
);
|
|
73
|
+
};
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
camelCaseToSpaces,
|
|
3
|
+
getIconClassName,
|
|
4
|
+
type IDoc,
|
|
5
|
+
type IPersistentVar,
|
|
6
|
+
type Observable,
|
|
7
|
+
observable,
|
|
8
|
+
PersistentVars,
|
|
9
|
+
} from "@peers-app/peers-sdk";
|
|
10
|
+
import { useEffect } from "react";
|
|
3
11
|
import { Checkbox } from "../../components/checkbox";
|
|
4
12
|
import { Input } from "../../components/input";
|
|
5
13
|
import { LoadingIndicator } from "../../components/loading-indicator";
|
|
@@ -14,25 +22,30 @@ interface IProps {
|
|
|
14
22
|
}
|
|
15
23
|
|
|
16
24
|
export const VariableDetails = (props: IProps) => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
const persistentVariable = usePromise(
|
|
26
|
+
async () => {
|
|
27
|
+
const persistentVariable = await PersistentVars().get(props.persistentVarId);
|
|
28
|
+
if (!persistentVariable) {
|
|
29
|
+
throw new Error("Variable not found");
|
|
30
|
+
}
|
|
31
|
+
updateActiveTabTitle(persistentVariable.name || "Variable");
|
|
32
|
+
return PersistentVars().initDoc(persistentVariable);
|
|
33
|
+
},
|
|
34
|
+
undefined,
|
|
35
|
+
[props.persistentVarId],
|
|
36
|
+
);
|
|
27
37
|
|
|
28
38
|
useEffect(() => {
|
|
29
39
|
if (!persistentVariable) return;
|
|
30
40
|
const sub = persistentVariable.qs.name.subscribe(() => {
|
|
31
|
-
persistentVariable.name = persistentVariable.qs
|
|
41
|
+
persistentVariable.name = persistentVariable.qs
|
|
42
|
+
.name()
|
|
43
|
+
.replaceAll(/\s/g, "_")
|
|
44
|
+
.replaceAll(/[^a-zA-Z0-9_-]/g, "");
|
|
32
45
|
});
|
|
33
46
|
return () => {
|
|
34
47
|
sub.dispose();
|
|
35
|
-
}
|
|
48
|
+
};
|
|
36
49
|
}, [persistentVariable]);
|
|
37
50
|
|
|
38
51
|
if (!persistentVariable) {
|
|
@@ -41,7 +54,6 @@ export const VariableDetails = (props: IProps) => {
|
|
|
41
54
|
|
|
42
55
|
return (
|
|
43
56
|
<div className="container-fluid p-3">
|
|
44
|
-
|
|
45
57
|
<div className="d-flex">
|
|
46
58
|
<div>
|
|
47
59
|
<h4>
|
|
@@ -52,17 +64,14 @@ export const VariableDetails = (props: IProps) => {
|
|
|
52
64
|
<h4>
|
|
53
65
|
<Input
|
|
54
66
|
key={persistentVariable.persistentVarId}
|
|
55
|
-
className=
|
|
56
|
-
style={{ width:
|
|
67
|
+
className="border border-0"
|
|
68
|
+
style={{ width: "100%", outline: "none", backgroundColor: "transparent" }}
|
|
57
69
|
value={persistentVariable.qs.name}
|
|
58
70
|
/>
|
|
59
71
|
</h4>
|
|
60
72
|
</div>
|
|
61
73
|
<div>
|
|
62
|
-
<SaveButton
|
|
63
|
-
key={persistentVariable.persistentVarId}
|
|
64
|
-
doc={persistentVariable}
|
|
65
|
-
/>
|
|
74
|
+
<SaveButton key={persistentVariable.persistentVarId} doc={persistentVariable} />
|
|
66
75
|
</div>
|
|
67
76
|
</div>
|
|
68
77
|
|
|
@@ -70,26 +79,26 @@ export const VariableDetails = (props: IProps) => {
|
|
|
70
79
|
key={persistentVariable.persistentVarId}
|
|
71
80
|
tabs={[
|
|
72
81
|
{
|
|
73
|
-
name:
|
|
82
|
+
name: "Info",
|
|
83
|
+
content: (
|
|
74
84
|
<ScreenTabBody>
|
|
75
85
|
<VariableInfo persistentVariable={persistentVariable} />
|
|
76
86
|
</ScreenTabBody>
|
|
87
|
+
),
|
|
77
88
|
},
|
|
78
89
|
]}
|
|
79
90
|
/>
|
|
80
91
|
</div>
|
|
81
|
-
)
|
|
82
|
-
}
|
|
83
|
-
|
|
92
|
+
);
|
|
93
|
+
};
|
|
84
94
|
|
|
85
95
|
const VariableInfo = (props: { persistentVariable: IDoc<IPersistentVar> }) => {
|
|
86
|
-
const { persistentVariable: pvar } = props
|
|
96
|
+
const { persistentVariable: pvar } = props;
|
|
87
97
|
|
|
88
|
-
pvar.description = pvar.description ||
|
|
98
|
+
pvar.description = pvar.description || "";
|
|
89
99
|
|
|
90
100
|
return (
|
|
91
101
|
<div>
|
|
92
|
-
|
|
93
102
|
<small>Name:</small>
|
|
94
103
|
<Input
|
|
95
104
|
value={pvar.qs.name}
|
|
@@ -102,10 +111,7 @@ const VariableInfo = (props: { persistentVariable: IDoc<IPersistentVar> }) => {
|
|
|
102
111
|
<VariableScope pvar={pvar} />
|
|
103
112
|
<div className="ms-2">
|
|
104
113
|
<label className="form-label small mt-2 me-2">Is Secret:</label>
|
|
105
|
-
<Checkbox
|
|
106
|
-
className="form-check-input mt-2"
|
|
107
|
-
checked={pvar.qs.isSecret}
|
|
108
|
-
/>
|
|
114
|
+
<Checkbox className="form-check-input mt-2" checked={pvar.qs.isSecret} />
|
|
109
115
|
</div>
|
|
110
116
|
</div>
|
|
111
117
|
|
|
@@ -113,29 +119,38 @@ const VariableInfo = (props: { persistentVariable: IDoc<IPersistentVar> }) => {
|
|
|
113
119
|
<VariableValue pvar={pvar} />
|
|
114
120
|
|
|
115
121
|
<small className="mt-2">Description:</small>
|
|
116
|
-
<MarkdownEditorInline
|
|
117
|
-
value={pvar.qs.description as Observable<string>}
|
|
118
|
-
/>
|
|
119
|
-
|
|
122
|
+
<MarkdownEditorInline value={pvar.qs.description as Observable<string>} />
|
|
120
123
|
</div>
|
|
121
|
-
)
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
+
);
|
|
125
|
+
};
|
|
124
126
|
|
|
125
127
|
const VariableScope = (props: { pvar: IDoc<IPersistentVar> }) => {
|
|
126
|
-
|
|
127
128
|
const { pvar } = props;
|
|
128
129
|
|
|
129
130
|
const [scope, setScope] = useObservable(pvar.qs.scope);
|
|
130
131
|
|
|
131
132
|
return (
|
|
132
133
|
<div className="dropdown">
|
|
133
|
-
<button
|
|
134
|
+
<button
|
|
135
|
+
className="btn btn-secondary dropdown-toggle"
|
|
136
|
+
type="button"
|
|
137
|
+
id="colorModeDropdown"
|
|
138
|
+
data-bs-toggle="dropdown"
|
|
139
|
+
aria-expanded="false"
|
|
140
|
+
>
|
|
134
141
|
Scope: {camelCaseToSpaces(scope)}
|
|
135
142
|
</button>
|
|
136
143
|
<ul className="dropdown-menu" aria-labelledby="colorModeDropdown">
|
|
137
|
-
<li
|
|
138
|
-
|
|
144
|
+
<li>
|
|
145
|
+
<button className="dropdown-item" onClick={() => setScope("device")}>
|
|
146
|
+
Device {scope === "device" && "✓"}
|
|
147
|
+
</button>
|
|
148
|
+
</li>
|
|
149
|
+
<li>
|
|
150
|
+
<button className="dropdown-item" onClick={() => setScope("user")}>
|
|
151
|
+
User {scope === "user" && "✓"}
|
|
152
|
+
</button>
|
|
153
|
+
</li>
|
|
139
154
|
{/* <li><button className="dropdown-item" onClick={() => setScope('group')}>Group {scope === 'group' && '✓'}</button></li> */}
|
|
140
155
|
</ul>
|
|
141
156
|
</div>
|
|
@@ -149,7 +164,7 @@ const VariableValue = (props: { pvar: IDoc<IPersistentVar> }) => {
|
|
|
149
164
|
const scalarValue = observable(pvar.value.value);
|
|
150
165
|
// WARNING: we're assuming this is a string
|
|
151
166
|
useSubscription(pvar.qs.value, (value) => {
|
|
152
|
-
scalarValue(value?.value);
|
|
167
|
+
scalarValue(value?.value);
|
|
153
168
|
});
|
|
154
169
|
useSubscription(scalarValue, (value) => {
|
|
155
170
|
pvar.value = { value };
|
|
@@ -167,17 +182,14 @@ const VariableValue = (props: { pvar: IDoc<IPersistentVar> }) => {
|
|
|
167
182
|
title="Variable value"
|
|
168
183
|
/>
|
|
169
184
|
</>
|
|
170
|
-
)
|
|
185
|
+
);
|
|
171
186
|
}
|
|
172
187
|
|
|
173
188
|
return (
|
|
174
189
|
<>
|
|
175
190
|
<small>Value:</small>
|
|
176
|
-
<MarkdownEditorInline
|
|
177
|
-
value={scalarValue}
|
|
178
|
-
hideToolbar
|
|
179
|
-
/>
|
|
191
|
+
<MarkdownEditorInline value={scalarValue} hideToolbar />
|
|
180
192
|
<br />
|
|
181
193
|
</>
|
|
182
|
-
)
|
|
183
|
-
}
|
|
194
|
+
);
|
|
195
|
+
};
|
|
@@ -1,21 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import {
|
|
2
|
+
getIconClassName,
|
|
3
|
+
getUserContext,
|
|
4
|
+
type IPersistentVar,
|
|
5
|
+
newid,
|
|
6
|
+
PersistentVars,
|
|
7
|
+
} from "@peers-app/peers-sdk";
|
|
8
|
+
import { ListScreen } from "../../components/list-screen";
|
|
9
|
+
import { MarkdownWithMentions } from "../../components/markdown-with-mentions";
|
|
10
|
+
import { mainContentPath } from "../../globals";
|
|
11
|
+
import { registerInternalPeersUI } from "../../ui-router/ui-loader";
|
|
7
12
|
|
|
8
13
|
export function VariableList() {
|
|
9
14
|
async function newRecord(name: string) {
|
|
10
15
|
const userContext = await getUserContext();
|
|
11
16
|
const isPersonal = userContext.currentlyActiveGroupId() === userContext.userId;
|
|
12
|
-
const varName = name.replace(/\s+/g,
|
|
17
|
+
const varName = name.replace(/\s+/g, "_");
|
|
13
18
|
const pVar = await PersistentVars().save({
|
|
14
19
|
persistentVarId: newid(),
|
|
15
20
|
name: varName,
|
|
16
|
-
scope: isPersonal ?
|
|
17
|
-
description:
|
|
18
|
-
value: { value:
|
|
21
|
+
scope: isPersonal ? "user" : "group",
|
|
22
|
+
description: "",
|
|
23
|
+
value: { value: "" },
|
|
19
24
|
userCreated: true,
|
|
20
25
|
});
|
|
21
26
|
mainContentPath(`variables/${pVar.persistentVarId}`);
|
|
@@ -24,26 +29,20 @@ export function VariableList() {
|
|
|
24
29
|
|
|
25
30
|
function getFilter(searchText: string) {
|
|
26
31
|
return {
|
|
27
|
-
$or: [
|
|
28
|
-
|
|
29
|
-
{ description: { $matchWords: searchText } },
|
|
30
|
-
],
|
|
31
|
-
userCreated: true
|
|
32
|
+
$or: [{ name: { $matchWords: searchText } }, { description: { $matchWords: searchText } }],
|
|
33
|
+
userCreated: true,
|
|
32
34
|
};
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
function renderItem(persistentVar: IPersistentVar) {
|
|
36
38
|
return (
|
|
37
|
-
<div
|
|
38
|
-
key={persistentVar.persistentVarId}
|
|
39
|
-
className='container-fluid pb-4'
|
|
40
|
-
>
|
|
39
|
+
<div key={persistentVar.persistentVarId} className="container-fluid pb-4">
|
|
41
40
|
<i className={getIconClassName(PersistentVars())}></i>
|
|
42
41
|
<a href={`#variables/${persistentVar.persistentVarId}`}>
|
|
43
|
-
{persistentVar.name ||
|
|
42
|
+
{persistentVar.name || "<empty-name>"}
|
|
44
43
|
</a>
|
|
45
|
-
<div style={{ paddingLeft:
|
|
46
|
-
<MarkdownWithMentions content={persistentVar.description ||
|
|
44
|
+
<div style={{ paddingLeft: "20px" }}>
|
|
45
|
+
<MarkdownWithMentions content={persistentVar.description || ""} />
|
|
47
46
|
</div>
|
|
48
47
|
</div>
|
|
49
48
|
);
|
|
@@ -54,7 +53,7 @@ export function VariableList() {
|
|
|
54
53
|
table={PersistentVars()}
|
|
55
54
|
newRecord={newRecord}
|
|
56
55
|
getFilter={getFilter}
|
|
57
|
-
sortBy={[
|
|
56
|
+
sortBy={["name"]}
|
|
58
57
|
renderItem={renderItem}
|
|
59
58
|
placeholderName="environment variable"
|
|
60
59
|
/>
|
|
@@ -62,13 +61,13 @@ export function VariableList() {
|
|
|
62
61
|
}
|
|
63
62
|
|
|
64
63
|
registerInternalPeersUI({
|
|
65
|
-
peersUIId:
|
|
64
|
+
peersUIId: "00m5fshz2g6ea23v8z6y0a1ci",
|
|
66
65
|
component: VariableList,
|
|
67
66
|
routes: [
|
|
68
67
|
{
|
|
69
|
-
isMatch: (
|
|
70
|
-
uiCategory:
|
|
71
|
-
priority: 2
|
|
72
|
-
}
|
|
73
|
-
]
|
|
74
|
-
})
|
|
68
|
+
isMatch: (_props, context) => context.path === "variables",
|
|
69
|
+
uiCategory: "screen",
|
|
70
|
+
priority: 2,
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
});
|