@peers-app/peers-ui 0.14.1 → 0.15.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.
- package/.github/workflows/publish.yml +8 -5
- package/babel.config.js +4 -4
- package/biome.json +198 -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 +83 -235
- 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 +45 -45
- 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 +185 -148
- 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 +41 -43
- 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,35 +1,57 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import {
|
|
2
|
+
autoUpdatePeersCore,
|
|
3
|
+
Devices,
|
|
4
|
+
getUserContext,
|
|
5
|
+
type IDevice,
|
|
6
|
+
packagesRootDir,
|
|
7
|
+
reloadPackagesOnPageRefresh,
|
|
8
|
+
rpcServerCalls,
|
|
9
|
+
TrustLevel,
|
|
10
|
+
thisDeviceId,
|
|
11
|
+
Users,
|
|
12
|
+
} from "@peers-app/peers-sdk";
|
|
13
|
+
import type React from "react";
|
|
14
|
+
import { useEffect, useRef, useState } from "react";
|
|
15
|
+
import { Input } from "../../components/input";
|
|
16
|
+
import { Tabs } from "../../components/tabs";
|
|
17
|
+
import { Tooltip } from "../../components/tooltip";
|
|
18
|
+
import * as globals from "../../globals";
|
|
19
|
+
import { useObservable, useObservableState, usePromise } from "../../hooks";
|
|
20
|
+
import { ColorModeDropdown } from "./color-mode-dropdown";
|
|
21
|
+
import { VoiceSettings } from "./voice-settings";
|
|
22
|
+
|
|
23
|
+
/** Electron file picker attaches a filesystem path on `File`. */
|
|
24
|
+
type FileWithElectronPath = File & { path?: string };
|
|
25
|
+
|
|
26
|
+
type PeersHostWindow = Window & {
|
|
27
|
+
electronAPI?: unknown;
|
|
28
|
+
ReactNativeWebView?: unknown;
|
|
29
|
+
};
|
|
10
30
|
|
|
11
31
|
export const SettingsPage: React.FC = () => {
|
|
12
32
|
return (
|
|
13
|
-
<div className=
|
|
14
|
-
<Tabs
|
|
15
|
-
{
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
<div className="container-fluid">
|
|
34
|
+
<Tabs
|
|
35
|
+
tabs={[
|
|
36
|
+
{
|
|
37
|
+
name: "User",
|
|
38
|
+
content: <UserSettingsTab />,
|
|
39
|
+
active: true,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: "Appearance",
|
|
43
|
+
content: <AppearanceSettingsTab />,
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: "Voice",
|
|
47
|
+
content: <VoiceSettings />,
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: "Advanced",
|
|
51
|
+
content: <AdvancedSettingsTab />,
|
|
52
|
+
},
|
|
53
|
+
]}
|
|
54
|
+
/>
|
|
33
55
|
</div>
|
|
34
56
|
);
|
|
35
57
|
};
|
|
@@ -69,8 +91,8 @@ const AdvancedSettingsTab: React.FC = () => {
|
|
|
69
91
|
|
|
70
92
|
const ProfileSection: React.FC = () => {
|
|
71
93
|
const [deviceId] = useObservable(thisDeviceId);
|
|
72
|
-
const deviceName = useObservableState<string>(
|
|
73
|
-
const savedDeviceName = useObservableState<string>(
|
|
94
|
+
const deviceName = useObservableState<string>("");
|
|
95
|
+
const savedDeviceName = useObservableState<string>("");
|
|
74
96
|
|
|
75
97
|
const me = usePromise(async () => {
|
|
76
98
|
const userContext = await getUserContext();
|
|
@@ -84,14 +106,14 @@ const ProfileSection: React.FC = () => {
|
|
|
84
106
|
try {
|
|
85
107
|
const userContext = await getUserContext();
|
|
86
108
|
const device = await Devices(userContext.userDataContext).get(deviceId);
|
|
87
|
-
deviceName(device?.name ||
|
|
88
|
-
savedDeviceName(device?.name ||
|
|
109
|
+
deviceName(device?.name || "");
|
|
110
|
+
savedDeviceName(device?.name || "");
|
|
89
111
|
} catch (err) {
|
|
90
|
-
console.error(
|
|
112
|
+
console.error("Error loading device name:", err);
|
|
91
113
|
}
|
|
92
114
|
};
|
|
93
115
|
loadDevice();
|
|
94
|
-
}, [deviceId]);
|
|
116
|
+
}, [deviceId, deviceName, savedDeviceName]);
|
|
95
117
|
|
|
96
118
|
const handleSave = async () => {
|
|
97
119
|
try {
|
|
@@ -106,7 +128,7 @@ const ProfileSection: React.FC = () => {
|
|
|
106
128
|
if (deviceId && deviceName() !== savedDeviceName()) {
|
|
107
129
|
const userContext = await getUserContext();
|
|
108
130
|
const devicesTable = Devices(userContext.userDataContext);
|
|
109
|
-
const device: IDevice = await devicesTable.get(deviceId) || {
|
|
131
|
+
const device: IDevice = (await devicesTable.get(deviceId)) || {
|
|
110
132
|
deviceId,
|
|
111
133
|
userId: userContext.userId,
|
|
112
134
|
firstSeen: new Date(),
|
|
@@ -118,8 +140,8 @@ const ProfileSection: React.FC = () => {
|
|
|
118
140
|
savedDeviceName(deviceName());
|
|
119
141
|
}
|
|
120
142
|
} catch (err) {
|
|
121
|
-
console.error(
|
|
122
|
-
alert(
|
|
143
|
+
console.error("Error saving profile:", err);
|
|
144
|
+
alert(`Failed to save: ${(err as Error).message}`);
|
|
123
145
|
}
|
|
124
146
|
};
|
|
125
147
|
|
|
@@ -137,22 +159,14 @@ const ProfileSection: React.FC = () => {
|
|
|
137
159
|
<>
|
|
138
160
|
<div className="d-flex align-items-center mb-3">
|
|
139
161
|
<h5 className="mb-0 me-auto">Settings</h5>
|
|
140
|
-
<button
|
|
141
|
-
className="btn btn-primary btn-sm"
|
|
142
|
-
onClick={handleSave}
|
|
143
|
-
disabled={!hasChanges}
|
|
144
|
-
>
|
|
162
|
+
<button className="btn btn-primary btn-sm" onClick={handleSave} disabled={!hasChanges}>
|
|
145
163
|
Save
|
|
146
164
|
</button>
|
|
147
165
|
</div>
|
|
148
166
|
|
|
149
167
|
<div className="mb-3">
|
|
150
168
|
<small className="form-label">Display Name:</small>
|
|
151
|
-
<Input
|
|
152
|
-
value={me.qs.name}
|
|
153
|
-
className="form-control"
|
|
154
|
-
placeholder="Enter your name"
|
|
155
|
-
/>
|
|
169
|
+
<Input value={me.qs.name} className="form-control" placeholder="Enter your name" />
|
|
156
170
|
</div>
|
|
157
171
|
|
|
158
172
|
<div className="mb-3">
|
|
@@ -160,11 +174,7 @@ const ProfileSection: React.FC = () => {
|
|
|
160
174
|
Device Name:
|
|
161
175
|
<Tooltip markdownContent="Give this device a friendly name to identify it in your network." />
|
|
162
176
|
</small>
|
|
163
|
-
<Input
|
|
164
|
-
value={deviceName}
|
|
165
|
-
className="form-control"
|
|
166
|
-
placeholder="e.g., My Laptop"
|
|
167
|
-
/>
|
|
177
|
+
<Input value={deviceName} className="form-control" placeholder="e.g., My Laptop" />
|
|
168
178
|
</div>
|
|
169
179
|
|
|
170
180
|
<div className="mb-3">
|
|
@@ -172,11 +182,7 @@ const ProfileSection: React.FC = () => {
|
|
|
172
182
|
User ID:
|
|
173
183
|
<Tooltip markdownContent="This uniquely identifies you to all other users." />
|
|
174
184
|
</small>
|
|
175
|
-
<Input
|
|
176
|
-
value={me.userId}
|
|
177
|
-
className="form-control"
|
|
178
|
-
disabled
|
|
179
|
-
/>
|
|
185
|
+
<Input value={me.userId} className="form-control" disabled />
|
|
180
186
|
</div>
|
|
181
187
|
|
|
182
188
|
<div className="row">
|
|
@@ -185,22 +191,14 @@ const ProfileSection: React.FC = () => {
|
|
|
185
191
|
Public Key:
|
|
186
192
|
<Tooltip markdownContent="This is your public key that other users will use to verify your signatures." />
|
|
187
193
|
</small>
|
|
188
|
-
<Input
|
|
189
|
-
value={me.publicKey}
|
|
190
|
-
className="form-control form-control-sm"
|
|
191
|
-
disabled
|
|
192
|
-
/>
|
|
194
|
+
<Input value={me.publicKey} className="form-control form-control-sm" disabled />
|
|
193
195
|
</div>
|
|
194
196
|
<div className="col-md-6 mb-3">
|
|
195
197
|
<small className="form-label">
|
|
196
198
|
Public Box Key:
|
|
197
199
|
<Tooltip markdownContent="This is the public key that other users can use to encrypt data so that only you can open it." />
|
|
198
200
|
</small>
|
|
199
|
-
<Input
|
|
200
|
-
value={me.publicBoxKey}
|
|
201
|
-
className="form-control form-control-sm"
|
|
202
|
-
disabled
|
|
203
|
-
/>
|
|
201
|
+
<Input value={me.publicBoxKey} className="form-control form-control-sm" disabled />
|
|
204
202
|
</div>
|
|
205
203
|
</div>
|
|
206
204
|
|
|
@@ -209,11 +207,7 @@ const ProfileSection: React.FC = () => {
|
|
|
209
207
|
Device ID:
|
|
210
208
|
<Tooltip markdownContent="This uniquely identifies this device on Peers networks." />
|
|
211
209
|
</small>
|
|
212
|
-
<Input
|
|
213
|
-
value={deviceId || ''}
|
|
214
|
-
className="form-control form-control-sm"
|
|
215
|
-
disabled
|
|
216
|
-
/>
|
|
210
|
+
<Input value={deviceId || ""} className="form-control form-control-sm" disabled />
|
|
217
211
|
</div>
|
|
218
212
|
</>
|
|
219
213
|
);
|
|
@@ -221,17 +215,12 @@ const ProfileSection: React.FC = () => {
|
|
|
221
215
|
|
|
222
216
|
const PackagesRootDirectory: React.FC = () => {
|
|
223
217
|
return (
|
|
224
|
-
<div className=
|
|
218
|
+
<div className="mt-3">
|
|
225
219
|
<small>
|
|
226
220
|
Packages Directory:
|
|
227
|
-
<Tooltip
|
|
228
|
-
markdownContent={`Changing this will not effect existing packages.`}
|
|
229
|
-
/>
|
|
221
|
+
<Tooltip markdownContent={`Changing this will not effect existing packages.`} />
|
|
230
222
|
</small>
|
|
231
|
-
<Input
|
|
232
|
-
value={packagesRootDir}
|
|
233
|
-
className='form-control'
|
|
234
|
-
/>
|
|
223
|
+
<Input value={packagesRootDir} className="form-control" />
|
|
235
224
|
</div>
|
|
236
225
|
);
|
|
237
226
|
};
|
|
@@ -256,7 +245,7 @@ const ReloadPackagesOnPageRefresh: React.FC = () => {
|
|
|
256
245
|
/>
|
|
257
246
|
</div>
|
|
258
247
|
);
|
|
259
|
-
}
|
|
248
|
+
};
|
|
260
249
|
|
|
261
250
|
const AutoUpdatePeersCore: React.FC = () => {
|
|
262
251
|
useObservable(autoUpdatePeersCore);
|
|
@@ -278,19 +267,19 @@ const AutoUpdatePeersCore: React.FC = () => {
|
|
|
278
267
|
/>
|
|
279
268
|
</div>
|
|
280
269
|
);
|
|
281
|
-
}
|
|
270
|
+
};
|
|
282
271
|
|
|
283
272
|
const ResetDeviceSyncInfos: React.FC = () => {
|
|
284
273
|
return (
|
|
285
|
-
<div className=
|
|
274
|
+
<div className="mt-3">
|
|
286
275
|
<button
|
|
287
|
-
className=
|
|
276
|
+
className="btn btn-secondary btn-sm ms-2"
|
|
288
277
|
onClick={async () => {
|
|
289
278
|
try {
|
|
290
279
|
await rpcServerCalls.resetAllDeviceSyncInfo();
|
|
291
|
-
alert(
|
|
280
|
+
alert("All device sync info has been reset. Syncing in progress...");
|
|
292
281
|
} catch (err) {
|
|
293
|
-
console.error(
|
|
282
|
+
console.error("Error while resetting all device sync info", err);
|
|
294
283
|
}
|
|
295
284
|
}}
|
|
296
285
|
>
|
|
@@ -298,25 +287,25 @@ const ResetDeviceSyncInfos: React.FC = () => {
|
|
|
298
287
|
</button>
|
|
299
288
|
</div>
|
|
300
289
|
);
|
|
301
|
-
}
|
|
290
|
+
};
|
|
302
291
|
|
|
303
292
|
const DeleteLocalDatabase: React.FC = () => {
|
|
304
293
|
return (
|
|
305
|
-
<div className=
|
|
294
|
+
<div className="mt-3">
|
|
306
295
|
<button
|
|
307
|
-
className=
|
|
296
|
+
className="btn btn-danger btn-sm ms-2"
|
|
308
297
|
onClick={async () => {
|
|
309
298
|
const confirmed = confirm(
|
|
310
|
-
|
|
311
|
-
|
|
299
|
+
"Are you sure you want to delete the local database for the current group? " +
|
|
300
|
+
"This will remove all local data. You will need to restart the app and re-sync from other devices.",
|
|
312
301
|
);
|
|
313
302
|
if (!confirmed) return;
|
|
314
303
|
try {
|
|
315
304
|
await rpcServerCalls.deleteLocalDatabase();
|
|
316
|
-
alert(
|
|
305
|
+
alert("Local database has been deleted. Please restart the app.");
|
|
317
306
|
} catch (err) {
|
|
318
|
-
console.error(
|
|
319
|
-
alert(
|
|
307
|
+
console.error("Error while deleting local database", err);
|
|
308
|
+
alert(`Failed to delete local database: ${(err as Error).message}`);
|
|
320
309
|
}
|
|
321
310
|
}}
|
|
322
311
|
>
|
|
@@ -324,7 +313,7 @@ const DeleteLocalDatabase: React.FC = () => {
|
|
|
324
313
|
</button>
|
|
325
314
|
</div>
|
|
326
315
|
);
|
|
327
|
-
}
|
|
316
|
+
};
|
|
328
317
|
|
|
329
318
|
const ResetChangeTracking: React.FC = () => {
|
|
330
319
|
const [busy, setBusy] = useState(false);
|
|
@@ -332,37 +321,38 @@ const ResetChangeTracking: React.FC = () => {
|
|
|
332
321
|
<div className="mt-4 pt-3 border-top">
|
|
333
322
|
<h6 className="mb-2">Change tracking</h6>
|
|
334
323
|
<small className="text-muted d-block mb-2">
|
|
335
|
-
Clears all change history for the current group and rebuilds it from your current database
|
|
336
|
-
Device sync cursors are cleared; a full resync with peers may follow. Use when
|
|
324
|
+
Clears all change history for the current group and rebuilds it from your current database
|
|
325
|
+
rows. Device sync cursors are cleared; a full resync with peers may follow. Use when
|
|
326
|
+
debugging sync issues.
|
|
337
327
|
</small>
|
|
338
328
|
<button
|
|
339
329
|
className="btn btn-warning btn-sm"
|
|
340
330
|
disabled={busy}
|
|
341
331
|
onClick={async () => {
|
|
342
332
|
const confirmed = window.confirm(
|
|
343
|
-
|
|
333
|
+
"Reset Change Tracking will clear all change history and rebuild it from scratch. This may take a while. Continue?",
|
|
344
334
|
);
|
|
345
335
|
if (!confirmed) return;
|
|
346
336
|
setBusy(true);
|
|
347
337
|
try {
|
|
348
338
|
await rpcServerCalls.resetChangeTracking();
|
|
349
339
|
await rpcServerCalls.flushDatabases();
|
|
350
|
-
alert(
|
|
340
|
+
alert("Change tracking reset successfully.");
|
|
351
341
|
} catch (err) {
|
|
352
|
-
console.error(
|
|
353
|
-
alert(
|
|
342
|
+
console.error("Error while resetting change tracking", err);
|
|
343
|
+
alert(`Failed to reset change tracking: ${(err as Error).message || String(err)}`);
|
|
354
344
|
} finally {
|
|
355
345
|
setBusy(false);
|
|
356
346
|
}
|
|
357
347
|
}}
|
|
358
348
|
>
|
|
359
|
-
{busy ?
|
|
349
|
+
{busy ? "Resetting…" : "Reset Change Tracking"}
|
|
360
350
|
</button>
|
|
361
351
|
</div>
|
|
362
352
|
);
|
|
363
353
|
};
|
|
364
354
|
|
|
365
|
-
const IMPORT_TOOL_ID =
|
|
355
|
+
const IMPORT_TOOL_ID = "00mh0wlipkdbeaw8imptsk001";
|
|
366
356
|
|
|
367
357
|
interface IDryRunResult {
|
|
368
358
|
totalRecords: number;
|
|
@@ -371,7 +361,7 @@ interface IDryRunResult {
|
|
|
371
361
|
groups: {
|
|
372
362
|
groupId: string;
|
|
373
363
|
groupName: string;
|
|
374
|
-
context:
|
|
364
|
+
context: "personal" | "home";
|
|
375
365
|
taskCount: number;
|
|
376
366
|
activeCount: number;
|
|
377
367
|
doneCount: number;
|
|
@@ -399,33 +389,33 @@ interface IDryRunResult {
|
|
|
399
389
|
|
|
400
390
|
const ImportOldPeersData: React.FC = () => {
|
|
401
391
|
const fileInputRef = useRef<HTMLInputElement>(null);
|
|
402
|
-
const [filePath, setFilePath] = useState<string>(
|
|
403
|
-
const [
|
|
392
|
+
const [filePath, setFilePath] = useState<string>("");
|
|
393
|
+
const [_fileName, setFileName] = useState<string>("");
|
|
404
394
|
const [loading, setLoading] = useState(false);
|
|
405
395
|
const [result, setResult] = useState<IDryRunResult | null>(null);
|
|
406
|
-
const [error, setError] = useState<string>(
|
|
396
|
+
const [error, setError] = useState<string>("");
|
|
407
397
|
|
|
408
398
|
const handleFileSelect = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
409
399
|
const file = e.target.files?.[0];
|
|
410
400
|
if (!file) return;
|
|
411
401
|
// Electron exposes .path on File objects
|
|
412
|
-
const path = (file as
|
|
402
|
+
const path = (file as FileWithElectronPath).path;
|
|
413
403
|
if (path) {
|
|
414
404
|
setFilePath(path);
|
|
415
405
|
setFileName(file.name);
|
|
416
406
|
} else {
|
|
417
407
|
setFileName(file.name);
|
|
418
|
-
setFilePath(
|
|
419
|
-
setError(
|
|
408
|
+
setFilePath("");
|
|
409
|
+
setError("File path not available. This feature requires the Electron desktop app.");
|
|
420
410
|
}
|
|
421
411
|
setResult(null);
|
|
422
|
-
setError(
|
|
412
|
+
setError("");
|
|
423
413
|
};
|
|
424
414
|
|
|
425
415
|
const handleDryRun = async () => {
|
|
426
416
|
if (!filePath) return;
|
|
427
417
|
setLoading(true);
|
|
428
|
-
setError(
|
|
418
|
+
setError("");
|
|
429
419
|
setResult(null);
|
|
430
420
|
try {
|
|
431
421
|
const response = await rpcServerCalls.runTool(IMPORT_TOOL_ID, {
|
|
@@ -435,10 +425,10 @@ const ImportOldPeersData: React.FC = () => {
|
|
|
435
425
|
if (response?.result) {
|
|
436
426
|
setResult(response.result);
|
|
437
427
|
} else {
|
|
438
|
-
setError(
|
|
428
|
+
setError("Unexpected response from import tool");
|
|
439
429
|
}
|
|
440
430
|
} catch (err) {
|
|
441
|
-
setError((err as Error).message ||
|
|
431
|
+
setError((err as Error).message || "Failed to run dry run");
|
|
442
432
|
} finally {
|
|
443
433
|
setLoading(false);
|
|
444
434
|
}
|
|
@@ -465,13 +455,11 @@ const ImportOldPeersData: React.FC = () => {
|
|
|
465
455
|
onClick={handleDryRun}
|
|
466
456
|
disabled={!filePath || loading}
|
|
467
457
|
>
|
|
468
|
-
{loading ?
|
|
458
|
+
{loading ? "Analyzing..." : "Dry Run"}
|
|
469
459
|
</button>
|
|
470
460
|
</div>
|
|
471
461
|
|
|
472
|
-
{error &&
|
|
473
|
-
<div className="alert alert-danger py-1 px-2 small mt-2">{error}</div>
|
|
474
|
-
)}
|
|
462
|
+
{error && <div className="alert alert-danger py-1 px-2 small mt-2">{error}</div>}
|
|
475
463
|
|
|
476
464
|
{result && <DryRunResults result={result} />}
|
|
477
465
|
</div>
|
|
@@ -485,56 +473,100 @@ const DryRunResults: React.FC<{ result: IDryRunResult }> = ({ result }) => {
|
|
|
485
473
|
return (
|
|
486
474
|
<div className="mt-2">
|
|
487
475
|
<div className="alert alert-info py-2 px-3 small">
|
|
488
|
-
<strong>Summary:</strong> {result.totalTasks.toLocaleString()} tasks
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
({result.totalRecords.toLocaleString()} total records in file)
|
|
476
|
+
<strong>Summary:</strong> {result.totalTasks.toLocaleString()} tasks and{" "}
|
|
477
|
+
{result.totalLogEntries.toLocaleString()} log entries across {result.groups.length} groups (
|
|
478
|
+
{result.totalRecords.toLocaleString()} total records in file)
|
|
492
479
|
</div>
|
|
493
480
|
|
|
494
481
|
{result.warnings.length > 0 && (
|
|
495
482
|
<div className="alert alert-warning py-2 px-3 small">
|
|
496
483
|
<strong>Warnings:</strong>
|
|
497
484
|
<ul className="mb-0 ps-3">
|
|
498
|
-
{result.warnings.map((w, i) =>
|
|
485
|
+
{result.warnings.map((w, i) => (
|
|
486
|
+
<li key={i}>{w}</li>
|
|
487
|
+
))}
|
|
499
488
|
</ul>
|
|
500
489
|
</div>
|
|
501
490
|
)}
|
|
502
491
|
|
|
503
492
|
<details className="mb-2">
|
|
504
|
-
<summary className="small fw-bold" style={{ cursor:
|
|
493
|
+
<summary className="small fw-bold" style={{ cursor: "pointer" }}>
|
|
505
494
|
Status Mapping
|
|
506
495
|
</summary>
|
|
507
496
|
<table className="table table-sm small mt-1">
|
|
508
|
-
<thead
|
|
497
|
+
<thead>
|
|
498
|
+
<tr>
|
|
499
|
+
<th>Mapping</th>
|
|
500
|
+
<th className="text-end">Count</th>
|
|
501
|
+
</tr>
|
|
502
|
+
</thead>
|
|
509
503
|
<tbody>
|
|
510
|
-
<tr
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
<tr
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
504
|
+
<tr>
|
|
505
|
+
<td>In-Progress → Done</td>
|
|
506
|
+
<td className="text-end">{sm.inProgressToDone.toLocaleString()}</td>
|
|
507
|
+
</tr>
|
|
508
|
+
<tr>
|
|
509
|
+
<td>In-Progress → In-Progress</td>
|
|
510
|
+
<td className="text-end">{sm.inProgressKeep.toLocaleString()}</td>
|
|
511
|
+
</tr>
|
|
512
|
+
<tr>
|
|
513
|
+
<td>Queued → Done</td>
|
|
514
|
+
<td className="text-end">{sm.queuedToDone.toLocaleString()}</td>
|
|
515
|
+
</tr>
|
|
516
|
+
<tr>
|
|
517
|
+
<td>Queued → Queued</td>
|
|
518
|
+
<td className="text-end">{sm.queuedKeep.toLocaleString()}</td>
|
|
519
|
+
</tr>
|
|
520
|
+
<tr>
|
|
521
|
+
<td>Backlog → Done</td>
|
|
522
|
+
<td className="text-end">{sm.backlogToDone.toLocaleString()}</td>
|
|
523
|
+
</tr>
|
|
524
|
+
<tr>
|
|
525
|
+
<td>Backlog → Backlog</td>
|
|
526
|
+
<td className="text-end">{sm.backlogKeep.toLocaleString()}</td>
|
|
527
|
+
</tr>
|
|
528
|
+
<tr>
|
|
529
|
+
<td>No status → Done</td>
|
|
530
|
+
<td className="text-end">{sm.noStatusToDone.toLocaleString()}</td>
|
|
531
|
+
</tr>
|
|
532
|
+
<tr>
|
|
533
|
+
<td>No status → Backlog</td>
|
|
534
|
+
<td className="text-end">{sm.noStatusToBacklog.toLocaleString()}</td>
|
|
535
|
+
</tr>
|
|
518
536
|
</tbody>
|
|
519
537
|
</table>
|
|
520
538
|
</details>
|
|
521
539
|
|
|
522
540
|
<details className="mb-2">
|
|
523
|
-
<summary className="small fw-bold" style={{ cursor:
|
|
541
|
+
<summary className="small fw-bold" style={{ cursor: "pointer" }}>
|
|
524
542
|
User Mapping
|
|
525
543
|
</summary>
|
|
526
544
|
<table className="table table-sm small mt-1">
|
|
527
|
-
<thead
|
|
545
|
+
<thead>
|
|
546
|
+
<tr>
|
|
547
|
+
<th>User</th>
|
|
548
|
+
<th className="text-end">Tasks</th>
|
|
549
|
+
</tr>
|
|
550
|
+
</thead>
|
|
528
551
|
<tbody>
|
|
529
|
-
<tr
|
|
530
|
-
|
|
531
|
-
|
|
552
|
+
<tr>
|
|
553
|
+
<td>Mark</td>
|
|
554
|
+
<td className="text-end">{um.mark.toLocaleString()}</td>
|
|
555
|
+
</tr>
|
|
556
|
+
<tr>
|
|
557
|
+
<td>Blair</td>
|
|
558
|
+
<td className="text-end">{um.blair.toLocaleString()}</td>
|
|
559
|
+
</tr>
|
|
560
|
+
<tr>
|
|
561
|
+
<td>Other → Mark</td>
|
|
562
|
+
<td className="text-end">{um.other.toLocaleString()}</td>
|
|
563
|
+
</tr>
|
|
532
564
|
</tbody>
|
|
533
565
|
</table>
|
|
534
566
|
</details>
|
|
535
567
|
|
|
536
568
|
<details open className="mb-2">
|
|
537
|
-
<summary className="small fw-bold" style={{ cursor:
|
|
569
|
+
<summary className="small fw-bold" style={{ cursor: "pointer" }}>
|
|
538
570
|
Groups ({result.groups.length})
|
|
539
571
|
</summary>
|
|
540
572
|
<table className="table table-sm small mt-1">
|
|
@@ -549,10 +581,14 @@ const DryRunResults: React.FC<{ result: IDryRunResult }> = ({ result }) => {
|
|
|
549
581
|
</tr>
|
|
550
582
|
</thead>
|
|
551
583
|
<tbody>
|
|
552
|
-
{result.groups.map(g => (
|
|
584
|
+
{result.groups.map((g) => (
|
|
553
585
|
<tr key={g.groupId}>
|
|
554
586
|
<td>{g.groupName}</td>
|
|
555
|
-
<td
|
|
587
|
+
<td>
|
|
588
|
+
<span className={`badge bg-${g.context === "home" ? "success" : "secondary"}`}>
|
|
589
|
+
{g.context}
|
|
590
|
+
</span>
|
|
591
|
+
</td>
|
|
556
592
|
<td className="text-end">{g.taskCount.toLocaleString()}</td>
|
|
557
593
|
<td className="text-end">{g.activeCount.toLocaleString()}</td>
|
|
558
594
|
<td className="text-end">{g.doneCount.toLocaleString()}</td>
|
|
@@ -566,9 +602,10 @@ const DryRunResults: React.FC<{ result: IDryRunResult }> = ({ result }) => {
|
|
|
566
602
|
);
|
|
567
603
|
};
|
|
568
604
|
|
|
569
|
-
const showLogoutInSettings =
|
|
570
|
-
|
|
571
|
-
|
|
605
|
+
const showLogoutInSettings =
|
|
606
|
+
typeof window !== "undefined" &&
|
|
607
|
+
!(window as PeersHostWindow).electronAPI &&
|
|
608
|
+
!(window as PeersHostWindow).ReactNativeWebView;
|
|
572
609
|
|
|
573
610
|
const LogoutSection: React.FC = () => {
|
|
574
611
|
if (!showLogoutInSettings) return null;
|
|
@@ -578,8 +615,8 @@ const LogoutSection: React.FC = () => {
|
|
|
578
615
|
className="btn btn-outline-danger btn-sm"
|
|
579
616
|
onClick={async () => {
|
|
580
617
|
const confirmed = confirm(
|
|
581
|
-
|
|
582
|
-
|
|
618
|
+
"Are you sure you want to logout? This will clear your credentials from this browser. " +
|
|
619
|
+
"Make sure you have your User ID and Secret Key saved securely, or you will lose access to your account.",
|
|
583
620
|
);
|
|
584
621
|
if (!confirmed) return;
|
|
585
622
|
await rpcServerCalls.logout();
|
|
@@ -589,4 +626,4 @@ const LogoutSection: React.FC = () => {
|
|
|
589
626
|
</button>
|
|
590
627
|
</div>
|
|
591
628
|
);
|
|
592
|
-
}
|
|
629
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { Assistants, type IAssistant, userVar } from "@peers-app/peers-sdk";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import { useCallback, useEffect, useState } from "react";
|
|
3
4
|
|
|
4
|
-
const VOICE_HUB_AGENT_ASSISTANT_ID =
|
|
5
|
+
const VOICE_HUB_AGENT_ASSISTANT_ID = "00mh0wlipkdbeaw8vhagent01";
|
|
5
6
|
|
|
6
7
|
// Must match the pvar names in peers-core/src/data/voice-agent-config.ts and
|
|
7
8
|
// peers-electron/src/server/voice/voice-agent-config.ts — pvar instances are
|
|
8
9
|
// singletons keyed by name+scope so all three share the same underlying value.
|
|
9
|
-
const voiceAgentAssistantIdPvar = userVar<string | undefined>(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
);
|
|
10
|
+
const voiceAgentAssistantIdPvar = userVar<string | undefined>("voice:agentAssistantId", {
|
|
11
|
+
defaultValue: VOICE_HUB_AGENT_ASSISTANT_ID,
|
|
12
|
+
});
|
|
13
13
|
|
|
14
14
|
export const VoiceSettingsAgent: React.FC = () => {
|
|
15
15
|
const [assistants, setAssistants] = useState<IAssistant[]>([]);
|
|
@@ -49,12 +49,13 @@ export const VoiceSettingsAgent: React.FC = () => {
|
|
|
49
49
|
<select
|
|
50
50
|
className="form-select form-select-sm"
|
|
51
51
|
value={selectedId}
|
|
52
|
-
onChange={e => setSelectedId(e.target.value)}
|
|
52
|
+
onChange={(e) => setSelectedId(e.target.value)}
|
|
53
53
|
disabled={saving}
|
|
54
54
|
>
|
|
55
|
-
{assistants.map(a => (
|
|
55
|
+
{assistants.map((a) => (
|
|
56
56
|
<option key={a.assistantId} value={a.assistantId}>
|
|
57
|
-
{a.name}
|
|
57
|
+
{a.name}
|
|
58
|
+
{a.assistantId === VOICE_HUB_AGENT_ASSISTANT_ID ? " (default)" : ""}
|
|
58
59
|
</option>
|
|
59
60
|
))}
|
|
60
61
|
</select>
|
|
@@ -62,9 +63,9 @@ export const VoiceSettingsAgent: React.FC = () => {
|
|
|
62
63
|
className="btn btn-sm btn-primary"
|
|
63
64
|
onClick={handleSave}
|
|
64
65
|
disabled={saving}
|
|
65
|
-
style={{ whiteSpace:
|
|
66
|
+
style={{ whiteSpace: "nowrap" }}
|
|
66
67
|
>
|
|
67
|
-
{saving ?
|
|
68
|
+
{saving ? "Saving…" : saved ? "Saved!" : "Save"}
|
|
68
69
|
</button>
|
|
69
70
|
</div>
|
|
70
71
|
</div>
|