@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,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
|
};
|
|
@@ -62,14 +84,15 @@ const AdvancedSettingsTab: React.FC = () => {
|
|
|
62
84
|
<ResetDeviceSyncInfos />
|
|
63
85
|
<DeleteLocalDatabase />
|
|
64
86
|
<ImportOldPeersData />
|
|
87
|
+
<ResetChangeTracking />
|
|
65
88
|
</>
|
|
66
89
|
);
|
|
67
90
|
};
|
|
68
91
|
|
|
69
92
|
const ProfileSection: React.FC = () => {
|
|
70
93
|
const [deviceId] = useObservable(thisDeviceId);
|
|
71
|
-
const deviceName = useObservableState<string>(
|
|
72
|
-
const savedDeviceName = useObservableState<string>(
|
|
94
|
+
const deviceName = useObservableState<string>("");
|
|
95
|
+
const savedDeviceName = useObservableState<string>("");
|
|
73
96
|
|
|
74
97
|
const me = usePromise(async () => {
|
|
75
98
|
const userContext = await getUserContext();
|
|
@@ -83,14 +106,14 @@ const ProfileSection: React.FC = () => {
|
|
|
83
106
|
try {
|
|
84
107
|
const userContext = await getUserContext();
|
|
85
108
|
const device = await Devices(userContext.userDataContext).get(deviceId);
|
|
86
|
-
deviceName(device?.name ||
|
|
87
|
-
savedDeviceName(device?.name ||
|
|
109
|
+
deviceName(device?.name || "");
|
|
110
|
+
savedDeviceName(device?.name || "");
|
|
88
111
|
} catch (err) {
|
|
89
|
-
console.error(
|
|
112
|
+
console.error("Error loading device name:", err);
|
|
90
113
|
}
|
|
91
114
|
};
|
|
92
115
|
loadDevice();
|
|
93
|
-
}, [deviceId]);
|
|
116
|
+
}, [deviceId, deviceName, savedDeviceName]);
|
|
94
117
|
|
|
95
118
|
const handleSave = async () => {
|
|
96
119
|
try {
|
|
@@ -105,7 +128,7 @@ const ProfileSection: React.FC = () => {
|
|
|
105
128
|
if (deviceId && deviceName() !== savedDeviceName()) {
|
|
106
129
|
const userContext = await getUserContext();
|
|
107
130
|
const devicesTable = Devices(userContext.userDataContext);
|
|
108
|
-
const device: IDevice = await devicesTable.get(deviceId) || {
|
|
131
|
+
const device: IDevice = (await devicesTable.get(deviceId)) || {
|
|
109
132
|
deviceId,
|
|
110
133
|
userId: userContext.userId,
|
|
111
134
|
firstSeen: new Date(),
|
|
@@ -117,8 +140,8 @@ const ProfileSection: React.FC = () => {
|
|
|
117
140
|
savedDeviceName(deviceName());
|
|
118
141
|
}
|
|
119
142
|
} catch (err) {
|
|
120
|
-
console.error(
|
|
121
|
-
alert(
|
|
143
|
+
console.error("Error saving profile:", err);
|
|
144
|
+
alert(`Failed to save: ${(err as Error).message}`);
|
|
122
145
|
}
|
|
123
146
|
};
|
|
124
147
|
|
|
@@ -136,22 +159,14 @@ const ProfileSection: React.FC = () => {
|
|
|
136
159
|
<>
|
|
137
160
|
<div className="d-flex align-items-center mb-3">
|
|
138
161
|
<h5 className="mb-0 me-auto">Settings</h5>
|
|
139
|
-
<button
|
|
140
|
-
className="btn btn-primary btn-sm"
|
|
141
|
-
onClick={handleSave}
|
|
142
|
-
disabled={!hasChanges}
|
|
143
|
-
>
|
|
162
|
+
<button className="btn btn-primary btn-sm" onClick={handleSave} disabled={!hasChanges}>
|
|
144
163
|
Save
|
|
145
164
|
</button>
|
|
146
165
|
</div>
|
|
147
166
|
|
|
148
167
|
<div className="mb-3">
|
|
149
168
|
<small className="form-label">Display Name:</small>
|
|
150
|
-
<Input
|
|
151
|
-
value={me.qs.name}
|
|
152
|
-
className="form-control"
|
|
153
|
-
placeholder="Enter your name"
|
|
154
|
-
/>
|
|
169
|
+
<Input value={me.qs.name} className="form-control" placeholder="Enter your name" />
|
|
155
170
|
</div>
|
|
156
171
|
|
|
157
172
|
<div className="mb-3">
|
|
@@ -159,11 +174,7 @@ const ProfileSection: React.FC = () => {
|
|
|
159
174
|
Device Name:
|
|
160
175
|
<Tooltip markdownContent="Give this device a friendly name to identify it in your network." />
|
|
161
176
|
</small>
|
|
162
|
-
<Input
|
|
163
|
-
value={deviceName}
|
|
164
|
-
className="form-control"
|
|
165
|
-
placeholder="e.g., My Laptop"
|
|
166
|
-
/>
|
|
177
|
+
<Input value={deviceName} className="form-control" placeholder="e.g., My Laptop" />
|
|
167
178
|
</div>
|
|
168
179
|
|
|
169
180
|
<div className="mb-3">
|
|
@@ -171,11 +182,7 @@ const ProfileSection: React.FC = () => {
|
|
|
171
182
|
User ID:
|
|
172
183
|
<Tooltip markdownContent="This uniquely identifies you to all other users." />
|
|
173
184
|
</small>
|
|
174
|
-
<Input
|
|
175
|
-
value={me.userId}
|
|
176
|
-
className="form-control"
|
|
177
|
-
disabled
|
|
178
|
-
/>
|
|
185
|
+
<Input value={me.userId} className="form-control" disabled />
|
|
179
186
|
</div>
|
|
180
187
|
|
|
181
188
|
<div className="row">
|
|
@@ -184,22 +191,14 @@ const ProfileSection: React.FC = () => {
|
|
|
184
191
|
Public Key:
|
|
185
192
|
<Tooltip markdownContent="This is your public key that other users will use to verify your signatures." />
|
|
186
193
|
</small>
|
|
187
|
-
<Input
|
|
188
|
-
value={me.publicKey}
|
|
189
|
-
className="form-control form-control-sm"
|
|
190
|
-
disabled
|
|
191
|
-
/>
|
|
194
|
+
<Input value={me.publicKey} className="form-control form-control-sm" disabled />
|
|
192
195
|
</div>
|
|
193
196
|
<div className="col-md-6 mb-3">
|
|
194
197
|
<small className="form-label">
|
|
195
198
|
Public Box Key:
|
|
196
199
|
<Tooltip markdownContent="This is the public key that other users can use to encrypt data so that only you can open it." />
|
|
197
200
|
</small>
|
|
198
|
-
<Input
|
|
199
|
-
value={me.publicBoxKey}
|
|
200
|
-
className="form-control form-control-sm"
|
|
201
|
-
disabled
|
|
202
|
-
/>
|
|
201
|
+
<Input value={me.publicBoxKey} className="form-control form-control-sm" disabled />
|
|
203
202
|
</div>
|
|
204
203
|
</div>
|
|
205
204
|
|
|
@@ -208,11 +207,7 @@ const ProfileSection: React.FC = () => {
|
|
|
208
207
|
Device ID:
|
|
209
208
|
<Tooltip markdownContent="This uniquely identifies this device on Peers networks." />
|
|
210
209
|
</small>
|
|
211
|
-
<Input
|
|
212
|
-
value={deviceId || ''}
|
|
213
|
-
className="form-control form-control-sm"
|
|
214
|
-
disabled
|
|
215
|
-
/>
|
|
210
|
+
<Input value={deviceId || ""} className="form-control form-control-sm" disabled />
|
|
216
211
|
</div>
|
|
217
212
|
</>
|
|
218
213
|
);
|
|
@@ -220,17 +215,12 @@ const ProfileSection: React.FC = () => {
|
|
|
220
215
|
|
|
221
216
|
const PackagesRootDirectory: React.FC = () => {
|
|
222
217
|
return (
|
|
223
|
-
<div className=
|
|
218
|
+
<div className="mt-3">
|
|
224
219
|
<small>
|
|
225
220
|
Packages Directory:
|
|
226
|
-
<Tooltip
|
|
227
|
-
markdownContent={`Changing this will not effect existing packages.`}
|
|
228
|
-
/>
|
|
221
|
+
<Tooltip markdownContent={`Changing this will not effect existing packages.`} />
|
|
229
222
|
</small>
|
|
230
|
-
<Input
|
|
231
|
-
value={packagesRootDir}
|
|
232
|
-
className='form-control'
|
|
233
|
-
/>
|
|
223
|
+
<Input value={packagesRootDir} className="form-control" />
|
|
234
224
|
</div>
|
|
235
225
|
);
|
|
236
226
|
};
|
|
@@ -255,7 +245,7 @@ const ReloadPackagesOnPageRefresh: React.FC = () => {
|
|
|
255
245
|
/>
|
|
256
246
|
</div>
|
|
257
247
|
);
|
|
258
|
-
}
|
|
248
|
+
};
|
|
259
249
|
|
|
260
250
|
const AutoUpdatePeersCore: React.FC = () => {
|
|
261
251
|
useObservable(autoUpdatePeersCore);
|
|
@@ -277,19 +267,19 @@ const AutoUpdatePeersCore: React.FC = () => {
|
|
|
277
267
|
/>
|
|
278
268
|
</div>
|
|
279
269
|
);
|
|
280
|
-
}
|
|
270
|
+
};
|
|
281
271
|
|
|
282
272
|
const ResetDeviceSyncInfos: React.FC = () => {
|
|
283
273
|
return (
|
|
284
|
-
<div className=
|
|
274
|
+
<div className="mt-3">
|
|
285
275
|
<button
|
|
286
|
-
className=
|
|
276
|
+
className="btn btn-secondary btn-sm ms-2"
|
|
287
277
|
onClick={async () => {
|
|
288
278
|
try {
|
|
289
279
|
await rpcServerCalls.resetAllDeviceSyncInfo();
|
|
290
|
-
alert(
|
|
280
|
+
alert("All device sync info has been reset. Syncing in progress...");
|
|
291
281
|
} catch (err) {
|
|
292
|
-
console.error(
|
|
282
|
+
console.error("Error while resetting all device sync info", err);
|
|
293
283
|
}
|
|
294
284
|
}}
|
|
295
285
|
>
|
|
@@ -297,25 +287,25 @@ const ResetDeviceSyncInfos: React.FC = () => {
|
|
|
297
287
|
</button>
|
|
298
288
|
</div>
|
|
299
289
|
);
|
|
300
|
-
}
|
|
290
|
+
};
|
|
301
291
|
|
|
302
292
|
const DeleteLocalDatabase: React.FC = () => {
|
|
303
293
|
return (
|
|
304
|
-
<div className=
|
|
294
|
+
<div className="mt-3">
|
|
305
295
|
<button
|
|
306
|
-
className=
|
|
296
|
+
className="btn btn-danger btn-sm ms-2"
|
|
307
297
|
onClick={async () => {
|
|
308
298
|
const confirmed = confirm(
|
|
309
|
-
|
|
310
|
-
|
|
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.",
|
|
311
301
|
);
|
|
312
302
|
if (!confirmed) return;
|
|
313
303
|
try {
|
|
314
304
|
await rpcServerCalls.deleteLocalDatabase();
|
|
315
|
-
alert(
|
|
305
|
+
alert("Local database has been deleted. Please restart the app.");
|
|
316
306
|
} catch (err) {
|
|
317
|
-
console.error(
|
|
318
|
-
alert(
|
|
307
|
+
console.error("Error while deleting local database", err);
|
|
308
|
+
alert(`Failed to delete local database: ${(err as Error).message}`);
|
|
319
309
|
}
|
|
320
310
|
}}
|
|
321
311
|
>
|
|
@@ -323,9 +313,46 @@ const DeleteLocalDatabase: React.FC = () => {
|
|
|
323
313
|
</button>
|
|
324
314
|
</div>
|
|
325
315
|
);
|
|
326
|
-
}
|
|
316
|
+
};
|
|
327
317
|
|
|
328
|
-
const
|
|
318
|
+
const ResetChangeTracking: React.FC = () => {
|
|
319
|
+
const [busy, setBusy] = useState(false);
|
|
320
|
+
return (
|
|
321
|
+
<div className="mt-4 pt-3 border-top">
|
|
322
|
+
<h6 className="mb-2">Change tracking</h6>
|
|
323
|
+
<small className="text-muted d-block mb-2">
|
|
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.
|
|
327
|
+
</small>
|
|
328
|
+
<button
|
|
329
|
+
className="btn btn-warning btn-sm"
|
|
330
|
+
disabled={busy}
|
|
331
|
+
onClick={async () => {
|
|
332
|
+
const confirmed = window.confirm(
|
|
333
|
+
"Reset Change Tracking will clear all change history and rebuild it from scratch. This may take a while. Continue?",
|
|
334
|
+
);
|
|
335
|
+
if (!confirmed) return;
|
|
336
|
+
setBusy(true);
|
|
337
|
+
try {
|
|
338
|
+
await rpcServerCalls.resetChangeTracking();
|
|
339
|
+
await rpcServerCalls.flushDatabases();
|
|
340
|
+
alert("Change tracking reset successfully.");
|
|
341
|
+
} catch (err) {
|
|
342
|
+
console.error("Error while resetting change tracking", err);
|
|
343
|
+
alert(`Failed to reset change tracking: ${(err as Error).message || String(err)}`);
|
|
344
|
+
} finally {
|
|
345
|
+
setBusy(false);
|
|
346
|
+
}
|
|
347
|
+
}}
|
|
348
|
+
>
|
|
349
|
+
{busy ? "Resetting…" : "Reset Change Tracking"}
|
|
350
|
+
</button>
|
|
351
|
+
</div>
|
|
352
|
+
);
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
const IMPORT_TOOL_ID = "00mh0wlipkdbeaw8imptsk001";
|
|
329
356
|
|
|
330
357
|
interface IDryRunResult {
|
|
331
358
|
totalRecords: number;
|
|
@@ -334,7 +361,7 @@ interface IDryRunResult {
|
|
|
334
361
|
groups: {
|
|
335
362
|
groupId: string;
|
|
336
363
|
groupName: string;
|
|
337
|
-
context:
|
|
364
|
+
context: "personal" | "home";
|
|
338
365
|
taskCount: number;
|
|
339
366
|
activeCount: number;
|
|
340
367
|
doneCount: number;
|
|
@@ -362,33 +389,33 @@ interface IDryRunResult {
|
|
|
362
389
|
|
|
363
390
|
const ImportOldPeersData: React.FC = () => {
|
|
364
391
|
const fileInputRef = useRef<HTMLInputElement>(null);
|
|
365
|
-
const [filePath, setFilePath] = useState<string>(
|
|
366
|
-
const [
|
|
392
|
+
const [filePath, setFilePath] = useState<string>("");
|
|
393
|
+
const [_fileName, setFileName] = useState<string>("");
|
|
367
394
|
const [loading, setLoading] = useState(false);
|
|
368
395
|
const [result, setResult] = useState<IDryRunResult | null>(null);
|
|
369
|
-
const [error, setError] = useState<string>(
|
|
396
|
+
const [error, setError] = useState<string>("");
|
|
370
397
|
|
|
371
398
|
const handleFileSelect = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
372
399
|
const file = e.target.files?.[0];
|
|
373
400
|
if (!file) return;
|
|
374
401
|
// Electron exposes .path on File objects
|
|
375
|
-
const path = (file as
|
|
402
|
+
const path = (file as FileWithElectronPath).path;
|
|
376
403
|
if (path) {
|
|
377
404
|
setFilePath(path);
|
|
378
405
|
setFileName(file.name);
|
|
379
406
|
} else {
|
|
380
407
|
setFileName(file.name);
|
|
381
|
-
setFilePath(
|
|
382
|
-
setError(
|
|
408
|
+
setFilePath("");
|
|
409
|
+
setError("File path not available. This feature requires the Electron desktop app.");
|
|
383
410
|
}
|
|
384
411
|
setResult(null);
|
|
385
|
-
setError(
|
|
412
|
+
setError("");
|
|
386
413
|
};
|
|
387
414
|
|
|
388
415
|
const handleDryRun = async () => {
|
|
389
416
|
if (!filePath) return;
|
|
390
417
|
setLoading(true);
|
|
391
|
-
setError(
|
|
418
|
+
setError("");
|
|
392
419
|
setResult(null);
|
|
393
420
|
try {
|
|
394
421
|
const response = await rpcServerCalls.runTool(IMPORT_TOOL_ID, {
|
|
@@ -398,10 +425,10 @@ const ImportOldPeersData: React.FC = () => {
|
|
|
398
425
|
if (response?.result) {
|
|
399
426
|
setResult(response.result);
|
|
400
427
|
} else {
|
|
401
|
-
setError(
|
|
428
|
+
setError("Unexpected response from import tool");
|
|
402
429
|
}
|
|
403
430
|
} catch (err) {
|
|
404
|
-
setError((err as Error).message ||
|
|
431
|
+
setError((err as Error).message || "Failed to run dry run");
|
|
405
432
|
} finally {
|
|
406
433
|
setLoading(false);
|
|
407
434
|
}
|
|
@@ -428,13 +455,11 @@ const ImportOldPeersData: React.FC = () => {
|
|
|
428
455
|
onClick={handleDryRun}
|
|
429
456
|
disabled={!filePath || loading}
|
|
430
457
|
>
|
|
431
|
-
{loading ?
|
|
458
|
+
{loading ? "Analyzing..." : "Dry Run"}
|
|
432
459
|
</button>
|
|
433
460
|
</div>
|
|
434
461
|
|
|
435
|
-
{error &&
|
|
436
|
-
<div className="alert alert-danger py-1 px-2 small mt-2">{error}</div>
|
|
437
|
-
)}
|
|
462
|
+
{error && <div className="alert alert-danger py-1 px-2 small mt-2">{error}</div>}
|
|
438
463
|
|
|
439
464
|
{result && <DryRunResults result={result} />}
|
|
440
465
|
</div>
|
|
@@ -448,56 +473,100 @@ const DryRunResults: React.FC<{ result: IDryRunResult }> = ({ result }) => {
|
|
|
448
473
|
return (
|
|
449
474
|
<div className="mt-2">
|
|
450
475
|
<div className="alert alert-info py-2 px-3 small">
|
|
451
|
-
<strong>Summary:</strong> {result.totalTasks.toLocaleString()} tasks
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
({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)
|
|
455
479
|
</div>
|
|
456
480
|
|
|
457
481
|
{result.warnings.length > 0 && (
|
|
458
482
|
<div className="alert alert-warning py-2 px-3 small">
|
|
459
483
|
<strong>Warnings:</strong>
|
|
460
484
|
<ul className="mb-0 ps-3">
|
|
461
|
-
{result.warnings.map((w, i) =>
|
|
485
|
+
{result.warnings.map((w, i) => (
|
|
486
|
+
<li key={i}>{w}</li>
|
|
487
|
+
))}
|
|
462
488
|
</ul>
|
|
463
489
|
</div>
|
|
464
490
|
)}
|
|
465
491
|
|
|
466
492
|
<details className="mb-2">
|
|
467
|
-
<summary className="small fw-bold" style={{ cursor:
|
|
493
|
+
<summary className="small fw-bold" style={{ cursor: "pointer" }}>
|
|
468
494
|
Status Mapping
|
|
469
495
|
</summary>
|
|
470
496
|
<table className="table table-sm small mt-1">
|
|
471
|
-
<thead
|
|
497
|
+
<thead>
|
|
498
|
+
<tr>
|
|
499
|
+
<th>Mapping</th>
|
|
500
|
+
<th className="text-end">Count</th>
|
|
501
|
+
</tr>
|
|
502
|
+
</thead>
|
|
472
503
|
<tbody>
|
|
473
|
-
<tr
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
<tr
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
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>
|
|
481
536
|
</tbody>
|
|
482
537
|
</table>
|
|
483
538
|
</details>
|
|
484
539
|
|
|
485
540
|
<details className="mb-2">
|
|
486
|
-
<summary className="small fw-bold" style={{ cursor:
|
|
541
|
+
<summary className="small fw-bold" style={{ cursor: "pointer" }}>
|
|
487
542
|
User Mapping
|
|
488
543
|
</summary>
|
|
489
544
|
<table className="table table-sm small mt-1">
|
|
490
|
-
<thead
|
|
545
|
+
<thead>
|
|
546
|
+
<tr>
|
|
547
|
+
<th>User</th>
|
|
548
|
+
<th className="text-end">Tasks</th>
|
|
549
|
+
</tr>
|
|
550
|
+
</thead>
|
|
491
551
|
<tbody>
|
|
492
|
-
<tr
|
|
493
|
-
|
|
494
|
-
|
|
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>
|
|
495
564
|
</tbody>
|
|
496
565
|
</table>
|
|
497
566
|
</details>
|
|
498
567
|
|
|
499
568
|
<details open className="mb-2">
|
|
500
|
-
<summary className="small fw-bold" style={{ cursor:
|
|
569
|
+
<summary className="small fw-bold" style={{ cursor: "pointer" }}>
|
|
501
570
|
Groups ({result.groups.length})
|
|
502
571
|
</summary>
|
|
503
572
|
<table className="table table-sm small mt-1">
|
|
@@ -512,10 +581,14 @@ const DryRunResults: React.FC<{ result: IDryRunResult }> = ({ result }) => {
|
|
|
512
581
|
</tr>
|
|
513
582
|
</thead>
|
|
514
583
|
<tbody>
|
|
515
|
-
{result.groups.map(g => (
|
|
584
|
+
{result.groups.map((g) => (
|
|
516
585
|
<tr key={g.groupId}>
|
|
517
586
|
<td>{g.groupName}</td>
|
|
518
|
-
<td
|
|
587
|
+
<td>
|
|
588
|
+
<span className={`badge bg-${g.context === "home" ? "success" : "secondary"}`}>
|
|
589
|
+
{g.context}
|
|
590
|
+
</span>
|
|
591
|
+
</td>
|
|
519
592
|
<td className="text-end">{g.taskCount.toLocaleString()}</td>
|
|
520
593
|
<td className="text-end">{g.activeCount.toLocaleString()}</td>
|
|
521
594
|
<td className="text-end">{g.doneCount.toLocaleString()}</td>
|
|
@@ -529,9 +602,10 @@ const DryRunResults: React.FC<{ result: IDryRunResult }> = ({ result }) => {
|
|
|
529
602
|
);
|
|
530
603
|
};
|
|
531
604
|
|
|
532
|
-
const showLogoutInSettings =
|
|
533
|
-
|
|
534
|
-
|
|
605
|
+
const showLogoutInSettings =
|
|
606
|
+
typeof window !== "undefined" &&
|
|
607
|
+
!(window as PeersHostWindow).electronAPI &&
|
|
608
|
+
!(window as PeersHostWindow).ReactNativeWebView;
|
|
535
609
|
|
|
536
610
|
const LogoutSection: React.FC = () => {
|
|
537
611
|
if (!showLogoutInSettings) return null;
|
|
@@ -541,8 +615,8 @@ const LogoutSection: React.FC = () => {
|
|
|
541
615
|
className="btn btn-outline-danger btn-sm"
|
|
542
616
|
onClick={async () => {
|
|
543
617
|
const confirmed = confirm(
|
|
544
|
-
|
|
545
|
-
|
|
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.",
|
|
546
620
|
);
|
|
547
621
|
if (!confirmed) return;
|
|
548
622
|
await rpcServerCalls.logout();
|
|
@@ -552,4 +626,4 @@ const LogoutSection: React.FC = () => {
|
|
|
552
626
|
</button>
|
|
553
627
|
</div>
|
|
554
628
|
);
|
|
555
|
-
}
|
|
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>
|