@peers-app/peers-ui 0.0.14
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/README.md +52 -0
- package/.github/workflows/publish.yml +45 -0
- package/babel.config.js +7 -0
- package/dist/app.d.ts +9 -0
- package/dist/app.js +54 -0
- package/dist/command-palette/command-palette-ui.d.ts +2 -0
- package/dist/command-palette/command-palette-ui.js +192 -0
- package/dist/command-palette/command-palette.d.ts +23 -0
- package/dist/command-palette/command-palette.js +371 -0
- package/dist/components/checkbox.d.ts +7 -0
- package/dist/components/checkbox.js +20 -0
- package/dist/components/group-switcher.d.ts +6 -0
- package/dist/components/group-switcher.js +301 -0
- package/dist/components/input-date.d.ts +7 -0
- package/dist/components/input-date.js +19 -0
- package/dist/components/input-datetime.d.ts +7 -0
- package/dist/components/input-datetime.js +35 -0
- package/dist/components/input-number.d.ts +9 -0
- package/dist/components/input-number.js +87 -0
- package/dist/components/input.d.ts +7 -0
- package/dist/components/input.js +20 -0
- package/dist/components/io-schema-values.d.ts +15 -0
- package/dist/components/io-schema-values.js +105 -0
- package/dist/components/io-schema.d.ts +13 -0
- package/dist/components/io-schema.js +163 -0
- package/dist/components/lazy-list.d.ts +13 -0
- package/dist/components/lazy-list.js +91 -0
- package/dist/components/lazy-sortable-list.d.ts +29 -0
- package/dist/components/lazy-sortable-list.js +12 -0
- package/dist/components/left-bar.d.ts +3 -0
- package/dist/components/left-bar.js +130 -0
- package/dist/components/list-screen.d.ts +16 -0
- package/dist/components/list-screen.js +100 -0
- package/dist/components/loading-indicator.d.ts +2 -0
- package/dist/components/loading-indicator.js +12 -0
- package/dist/components/main-content-container.d.ts +2 -0
- package/dist/components/main-content-container.js +90 -0
- package/dist/components/markdown-editor/autolink-plugin.d.ts +2 -0
- package/dist/components/markdown-editor/autolink-plugin.js +29 -0
- package/dist/components/markdown-editor/editor-inline.d.ts +3 -0
- package/dist/components/markdown-editor/editor-inline.js +13 -0
- package/dist/components/markdown-editor/editor.d.ts +18 -0
- package/dist/components/markdown-editor/editor.js +143 -0
- package/dist/components/markdown-editor/markdown-plugin.d.ts +9 -0
- package/dist/components/markdown-editor/markdown-plugin.js +194 -0
- package/dist/components/markdown-editor/mention-node.d.ts +21 -0
- package/dist/components/markdown-editor/mention-node.js +160 -0
- package/dist/components/markdown-editor/mentions-plugin.d.ts +7 -0
- package/dist/components/markdown-editor/mentions-plugin.js +268 -0
- package/dist/components/markdown-editor/theme.d.ts +46 -0
- package/dist/components/markdown-editor/theme.js +48 -0
- package/dist/components/markdown-editor/toolbar.d.ts +10 -0
- package/dist/components/markdown-editor/toolbar.js +112 -0
- package/dist/components/markdown-with-mentions.d.ts +4 -0
- package/dist/components/markdown-with-mentions.js +140 -0
- package/dist/components/message-logs/message-logs.d.ts +6 -0
- package/dist/components/message-logs/message-logs.js +307 -0
- package/dist/components/messages/avatar.d.ts +10 -0
- package/dist/components/messages/avatar.js +65 -0
- package/dist/components/messages/channel-message-list.d.ts +14 -0
- package/dist/components/messages/channel-message-list.js +158 -0
- package/dist/components/messages/channel-view.d.ts +6 -0
- package/dist/components/messages/channel-view.js +82 -0
- package/dist/components/messages/message-compose.d.ts +11 -0
- package/dist/components/messages/message-compose.js +152 -0
- package/dist/components/messages/message-display.d.ts +10 -0
- package/dist/components/messages/message-display.js +152 -0
- package/dist/components/messages/thread-message-list.d.ts +11 -0
- package/dist/components/messages/thread-message-list.js +122 -0
- package/dist/components/messages/thread-view.d.ts +6 -0
- package/dist/components/messages/thread-view.js +174 -0
- package/dist/components/off-canvas.d.ts +13 -0
- package/dist/components/off-canvas.js +89 -0
- package/dist/components/router.d.ts +6 -0
- package/dist/components/router.js +240 -0
- package/dist/components/save-button.d.ts +13 -0
- package/dist/components/save-button.js +75 -0
- package/dist/components/sortable-list.d.ts +36 -0
- package/dist/components/sortable-list.js +77 -0
- package/dist/components/tabs.d.ts +11 -0
- package/dist/components/tabs.js +69 -0
- package/dist/components/text-list-editor.tsx/text-list-editor.d.ts +6 -0
- package/dist/components/text-list-editor.tsx/text-list-editor.js +13 -0
- package/dist/components/tooltip.d.ts +11 -0
- package/dist/components/tooltip.js +20 -0
- package/dist/components/top-bar.d.ts +2 -0
- package/dist/components/top-bar.js +51 -0
- package/dist/components/typeahead/mentions-plugin.d.ts +7 -0
- package/dist/components/typeahead/mentions-plugin.js +203 -0
- package/dist/components/typeahead/typeahead-editor.d.ts +15 -0
- package/dist/components/typeahead/typeahead-editor.js +134 -0
- package/dist/components/typeahead/typeahead.d.ts +12 -0
- package/dist/components/typeahead/typeahead.js +94 -0
- package/dist/components/typeahead.d.ts +22 -0
- package/dist/components/typeahead.js +270 -0
- package/dist/globals.d.ts +29 -0
- package/dist/globals.js +148 -0
- package/dist/hooks.d.ts +34 -0
- package/dist/hooks.js +137 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +20 -0
- package/dist/layout-vars.d.ts +6 -0
- package/dist/layout-vars.js +10 -0
- package/dist/mention-configs.d.ts +18 -0
- package/dist/mention-configs.js +149 -0
- package/dist/screens/assistants/assistant-config.d.ts +5 -0
- package/dist/screens/assistants/assistant-config.js +52 -0
- package/dist/screens/assistants/assistant-details.d.ts +4 -0
- package/dist/screens/assistants/assistant-details.js +85 -0
- package/dist/screens/assistants/assistant-info.d.ts +6 -0
- package/dist/screens/assistants/assistant-info.js +28 -0
- package/dist/screens/assistants/assistant-list.d.ts +2 -0
- package/dist/screens/assistants/assistant-list.js +114 -0
- package/dist/screens/assistants/assistant-tools.d.ts +5 -0
- package/dist/screens/assistants/assistant-tools.js +38 -0
- package/dist/screens/contacts/contact-details.d.ts +6 -0
- package/dist/screens/contacts/contact-details.js +100 -0
- package/dist/screens/contacts/contact-list.d.ts +2 -0
- package/dist/screens/contacts/contact-list.js +213 -0
- package/dist/screens/contacts/index.d.ts +4 -0
- package/dist/screens/contacts/index.js +21 -0
- package/dist/screens/events/cron.d.ts +3 -0
- package/dist/screens/events/cron.js +77 -0
- package/dist/screens/events/event-details.d.ts +6 -0
- package/dist/screens/events/event-details.js +112 -0
- package/dist/screens/events/event-handlers.d.ts +7 -0
- package/dist/screens/events/event-handlers.js +84 -0
- package/dist/screens/events/event-info.d.ts +5 -0
- package/dist/screens/events/event-info.js +19 -0
- package/dist/screens/events/event-list.d.ts +2 -0
- package/dist/screens/events/event-list.js +107 -0
- package/dist/screens/events/event-schedule.d.ts +5 -0
- package/dist/screens/events/event-schedule.js +124 -0
- package/dist/screens/groups/group-details.d.ts +6 -0
- package/dist/screens/groups/group-details.js +218 -0
- package/dist/screens/groups/group-list.d.ts +2 -0
- package/dist/screens/groups/group-list.js +275 -0
- package/dist/screens/groups/group-members.d.ts +8 -0
- package/dist/screens/groups/group-members.js +315 -0
- package/dist/screens/groups/index.d.ts +6 -0
- package/dist/screens/groups/index.js +23 -0
- package/dist/screens/knowledge/knowledge-frame-details.bk.d.ts +6 -0
- package/dist/screens/knowledge/knowledge-frame-details.bk.js +84 -0
- package/dist/screens/knowledge/knowledge-frame-details.d.ts +8 -0
- package/dist/screens/knowledge/knowledge-frame-details.js +143 -0
- package/dist/screens/knowledge/knowledge-frame-list.d.ts +2 -0
- package/dist/screens/knowledge/knowledge-frame-list.js +45 -0
- package/dist/screens/knowledge/knowledge-value-details.d.ts +6 -0
- package/dist/screens/knowledge/knowledge-value-details.js +150 -0
- package/dist/screens/knowledge/knowledge-value-list-item.d.ts +5 -0
- package/dist/screens/knowledge/knowledge-value-list-item.js +39 -0
- package/dist/screens/knowledge/knowledge-value-list.d.ts +3 -0
- package/dist/screens/knowledge/knowledge-value-list.js +123 -0
- package/dist/screens/packages/package-details.d.ts +6 -0
- package/dist/screens/packages/package-details.js +82 -0
- package/dist/screens/packages/package-info.d.ts +5 -0
- package/dist/screens/packages/package-info.js +42 -0
- package/dist/screens/packages/package-list.d.ts +2 -0
- package/dist/screens/packages/package-list.js +182 -0
- package/dist/screens/packages/package-new-local.d.ts +2 -0
- package/dist/screens/packages/package-new-local.js +82 -0
- package/dist/screens/peer-types/peer-type-details.d.ts +10 -0
- package/dist/screens/peer-types/peer-type-details.js +126 -0
- package/dist/screens/peer-types/peer-type-list.d.ts +2 -0
- package/dist/screens/peer-types/peer-type-list.js +57 -0
- package/dist/screens/predicates/predicate-details.d.ts +6 -0
- package/dist/screens/predicates/predicate-details.js +103 -0
- package/dist/screens/predicates/predicate-list.d.ts +2 -0
- package/dist/screens/predicates/predicate-list.js +46 -0
- package/dist/screens/profile.d.ts +2 -0
- package/dist/screens/profile.js +66 -0
- package/dist/screens/search/global-search.d.ts +2 -0
- package/dist/screens/search/global-search.js +186 -0
- package/dist/screens/settings/color-mode-dropdown.d.ts +6 -0
- package/dist/screens/settings/color-mode-dropdown.js +63 -0
- package/dist/screens/settings/settings-page.d.ts +2 -0
- package/dist/screens/settings/settings-page.js +49 -0
- package/dist/screens/setup-user.d.ts +2 -0
- package/dist/screens/setup-user.js +270 -0
- package/dist/screens/tools/tool-code.d.ts +5 -0
- package/dist/screens/tools/tool-code.js +32 -0
- package/dist/screens/tools/tool-details.d.ts +6 -0
- package/dist/screens/tools/tool-details.js +68 -0
- package/dist/screens/tools/tool-info.d.ts +5 -0
- package/dist/screens/tools/tool-info.js +74 -0
- package/dist/screens/tools/tool-list.d.ts +2 -0
- package/dist/screens/tools/tool-list.js +123 -0
- package/dist/screens/tools/tool-schema.d.ts +5 -0
- package/dist/screens/tools/tool-schema.js +30 -0
- package/dist/screens/tools/tool-test-details.d.ts +4 -0
- package/dist/screens/tools/tool-test-details.js +54 -0
- package/dist/screens/tools/tool-test-list.d.ts +4 -0
- package/dist/screens/tools/tool-test-list.js +82 -0
- package/dist/screens/variables/variable-details.d.ts +6 -0
- package/dist/screens/variables/variable-details.js +140 -0
- package/dist/screens/variables/variable-list.d.ts +2 -0
- package/dist/screens/variables/variable-list.js +58 -0
- package/dist/screens/workflows/workflow-details.d.ts +6 -0
- package/dist/screens/workflows/workflow-details.js +122 -0
- package/dist/screens/workflows/workflow-info.d.ts +5 -0
- package/dist/screens/workflows/workflow-info.js +18 -0
- package/dist/screens/workflows/workflow-instructions.d.ts +5 -0
- package/dist/screens/workflows/workflow-instructions.js +118 -0
- package/dist/screens/workflows/workflow-list.d.ts +2 -0
- package/dist/screens/workflows/workflow-list.js +109 -0
- package/dist/screens/workflows/workflow-subscriptions.d.ts +6 -0
- package/dist/screens/workflows/workflow-subscriptions.js +81 -0
- package/dist/setupTests.d.ts +1 -0
- package/dist/setupTests.js +31 -0
- package/dist/system-apps/assistants.app.d.ts +2 -0
- package/dist/system-apps/assistants.app.js +8 -0
- package/dist/system-apps/contacts.app.d.ts +2 -0
- package/dist/system-apps/contacts.app.js +9 -0
- package/dist/system-apps/events.app.d.ts +2 -0
- package/dist/system-apps/events.app.js +8 -0
- package/dist/system-apps/groups.app.d.ts +2 -0
- package/dist/system-apps/groups.app.js +9 -0
- package/dist/system-apps/index.d.ts +19 -0
- package/dist/system-apps/index.js +90 -0
- package/dist/system-apps/knowledge-frames.app.d.ts +2 -0
- package/dist/system-apps/knowledge-frames.app.js +9 -0
- package/dist/system-apps/knowledge-values.app.d.ts +2 -0
- package/dist/system-apps/knowledge-values.app.js +9 -0
- package/dist/system-apps/packages.app.d.ts +2 -0
- package/dist/system-apps/packages.app.js +8 -0
- package/dist/system-apps/predicates.app.d.ts +2 -0
- package/dist/system-apps/predicates.app.js +8 -0
- package/dist/system-apps/profile.app.d.ts +2 -0
- package/dist/system-apps/profile.app.js +8 -0
- package/dist/system-apps/search.app.d.ts +2 -0
- package/dist/system-apps/search.app.js +9 -0
- package/dist/system-apps/settings.app.d.ts +2 -0
- package/dist/system-apps/settings.app.js +8 -0
- package/dist/system-apps/threads.app.d.ts +2 -0
- package/dist/system-apps/threads.app.js +8 -0
- package/dist/system-apps/tools.app.d.ts +2 -0
- package/dist/system-apps/tools.app.js +8 -0
- package/dist/system-apps/types.app.d.ts +2 -0
- package/dist/system-apps/types.app.js +8 -0
- package/dist/system-apps/variables.app.d.ts +2 -0
- package/dist/system-apps/variables.app.js +8 -0
- package/dist/system-apps/workflows.app.d.ts +2 -0
- package/dist/system-apps/workflows.app.js +8 -0
- package/dist/tabs-layout/tabs-layout.d.ts +5 -0
- package/dist/tabs-layout/tabs-layout.js +374 -0
- package/dist/tabs-layout/tabs-state.d.ts +26 -0
- package/dist/tabs-layout/tabs-state.js +239 -0
- package/dist/three-bar-layout/left-bar-content.d.ts +7 -0
- package/dist/three-bar-layout/left-bar-content.js +151 -0
- package/dist/three-bar-layout/right-bar-content.d.ts +2 -0
- package/dist/three-bar-layout/right-bar-content.js +64 -0
- package/dist/three-bar-layout/three-bar-layout.d.ts +5 -0
- package/dist/three-bar-layout/three-bar-layout.js +218 -0
- package/dist/ui-defaults/index.d.ts +2 -0
- package/dist/ui-defaults/index.js +4 -0
- package/dist/ui-defaults/list-screen.d.ts +6 -0
- package/dist/ui-defaults/list-screen.js +74 -0
- package/dist/ui-defaults/notes-editor.d.ts +7 -0
- package/dist/ui-defaults/notes-editor.js +41 -0
- package/dist/ui-router/routes-loader.d.ts +25 -0
- package/dist/ui-router/routes-loader.js +97 -0
- package/dist/ui-router/ui-loader.d.ts +18 -0
- package/dist/ui-router/ui-loader.js +481 -0
- package/dist/utils.d.ts +9 -0
- package/dist/utils.js +250 -0
- package/docs/conversation-tab.md +201 -0
- package/docs/getting-started.md +284 -0
- package/docs/knowledge.md +187 -0
- package/docs/tabs-ui.md +696 -0
- package/docs/user-contacts-ui.md +384 -0
- package/jest.config.js +25 -0
- package/package.json +109 -0
- package/src/app.tsx +59 -0
- package/src/command-palette/command-palette-ui.tsx +264 -0
- package/src/command-palette/command-palette.ts +364 -0
- package/src/components/checkbox.tsx +22 -0
- package/src/components/group-switcher.tsx +469 -0
- package/src/components/input-date.tsx +28 -0
- package/src/components/input-datetime.tsx +41 -0
- package/src/components/input-number.tsx +67 -0
- package/src/components/input.tsx +22 -0
- package/src/components/io-schema-values.tsx +122 -0
- package/src/components/io-schema.tsx +234 -0
- package/src/components/lazy-list.tsx +98 -0
- package/src/components/lazy-sortable-list.tsx +51 -0
- package/src/components/left-bar.tsx +264 -0
- package/src/components/list-screen.tsx +105 -0
- package/src/components/loading-indicator.tsx +9 -0
- package/src/components/main-content-container.tsx +76 -0
- package/src/components/markdown-editor/autolink-plugin.tsx +36 -0
- package/src/components/markdown-editor/editor-inline.tsx +10 -0
- package/src/components/markdown-editor/editor.tsx +152 -0
- package/src/components/markdown-editor/markdown-plugin.tsx +224 -0
- package/src/components/markdown-editor/mention-node.ts +199 -0
- package/src/components/markdown-editor/mentions-plugin.tsx +356 -0
- package/src/components/markdown-editor/theme.ts +47 -0
- package/src/components/markdown-editor/toolbar.tsx +263 -0
- package/src/components/markdown-with-mentions.tsx +183 -0
- package/src/components/message-logs/message-logs.tsx +406 -0
- package/src/components/messages/avatar.tsx +95 -0
- package/src/components/messages/channel-message-list.tsx +177 -0
- package/src/components/messages/channel-view.tsx +74 -0
- package/src/components/messages/message-compose.tsx +162 -0
- package/src/components/messages/message-display.tsx +217 -0
- package/src/components/messages/thread-message-list.tsx +126 -0
- package/src/components/messages/thread-view.tsx +214 -0
- package/src/components/off-canvas.tsx +83 -0
- package/src/components/router.tsx +224 -0
- package/src/components/save-button.tsx +109 -0
- package/src/components/sortable-list.tsx +102 -0
- package/src/components/tabs.tsx +70 -0
- package/src/components/text-list-editor.tsx/text-list-editor.tsx +13 -0
- package/src/components/tooltip.tsx +50 -0
- package/src/components/top-bar.tsx +119 -0
- package/src/components/typeahead/mentions-plugin.tsx +265 -0
- package/src/components/typeahead/typeahead-editor.tsx +140 -0
- package/src/components/typeahead/typeahead.tsx +77 -0
- package/src/components/typeahead.tsx +359 -0
- package/src/globals.tsx +162 -0
- package/src/hooks.ts +144 -0
- package/src/index.tsx +8 -0
- package/src/layout-vars.ts +8 -0
- package/src/mention-configs.ts +166 -0
- package/src/screens/assistants/assistant-config.tsx +80 -0
- package/src/screens/assistants/assistant-details.tsx +77 -0
- package/src/screens/assistants/assistant-info.tsx +45 -0
- package/src/screens/assistants/assistant-list.tsx +115 -0
- package/src/screens/assistants/assistant-tools.tsx +61 -0
- package/src/screens/contacts/contact-details.tsx +175 -0
- package/src/screens/contacts/contact-list.tsx +251 -0
- package/src/screens/contacts/index.ts +6 -0
- package/src/screens/events/cron.ts +74 -0
- package/src/screens/events/event-details.tsx +117 -0
- package/src/screens/events/event-handlers.tsx +61 -0
- package/src/screens/events/event-info.tsx +29 -0
- package/src/screens/events/event-list.tsx +104 -0
- package/src/screens/events/event-schedule.tsx +130 -0
- package/src/screens/groups/group-details.tsx +306 -0
- package/src/screens/groups/group-list.tsx +366 -0
- package/src/screens/groups/group-members.tsx +455 -0
- package/src/screens/groups/index.ts +9 -0
- package/src/screens/knowledge/knowledge-frame-details.bk.tsx +160 -0
- package/src/screens/knowledge/knowledge-frame-details.tsx +176 -0
- package/src/screens/knowledge/knowledge-frame-list.tsx +49 -0
- package/src/screens/knowledge/knowledge-value-details.tsx +181 -0
- package/src/screens/knowledge/knowledge-value-list-item.tsx +48 -0
- package/src/screens/knowledge/knowledge-value-list.tsx +131 -0
- package/src/screens/packages/package-details.tsx +117 -0
- package/src/screens/packages/package-info.tsx +83 -0
- package/src/screens/packages/package-list.tsx +191 -0
- package/src/screens/packages/package-new-local.tsx +93 -0
- package/src/screens/peer-types/peer-type-details.tsx +162 -0
- package/src/screens/peer-types/peer-type-list.tsx +74 -0
- package/src/screens/predicates/predicate-details.tsx +125 -0
- package/src/screens/predicates/predicate-list.tsx +50 -0
- package/src/screens/profile.tsx +68 -0
- package/src/screens/search/global-search.tsx +274 -0
- package/src/screens/settings/color-mode-dropdown.tsx +57 -0
- package/src/screens/settings/settings-page.tsx +76 -0
- package/src/screens/setup-user.tsx +367 -0
- package/src/screens/tools/tool-code.tsx +35 -0
- package/src/screens/tools/tool-details.tsx +101 -0
- package/src/screens/tools/tool-info.tsx +60 -0
- package/src/screens/tools/tool-list.tsx +121 -0
- package/src/screens/tools/tool-schema.tsx +42 -0
- package/src/screens/tools/tool-test-details.tsx +100 -0
- package/src/screens/tools/tool-test-list.tsx +74 -0
- package/src/screens/variables/variable-details.tsx +183 -0
- package/src/screens/variables/variable-list.tsx +74 -0
- package/src/screens/workflows/workflow-details.tsx +130 -0
- package/src/screens/workflows/workflow-info.tsx +29 -0
- package/src/screens/workflows/workflow-instructions.tsx +127 -0
- package/src/screens/workflows/workflow-list.tsx +107 -0
- package/src/screens/workflows/workflow-subscriptions.tsx +58 -0
- package/src/setupTests.ts +32 -0
- package/src/system-apps/assistants.app.ts +7 -0
- package/src/system-apps/contacts.app.ts +8 -0
- package/src/system-apps/events.app.ts +7 -0
- package/src/system-apps/groups.app.ts +8 -0
- package/src/system-apps/index.ts +79 -0
- package/src/system-apps/knowledge-frames.app.ts +8 -0
- package/src/system-apps/knowledge-values.app.ts +8 -0
- package/src/system-apps/packages.app.ts +7 -0
- package/src/system-apps/predicates.app.ts +7 -0
- package/src/system-apps/profile.app.ts +7 -0
- package/src/system-apps/search.app.ts +8 -0
- package/src/system-apps/settings.app.ts +7 -0
- package/src/system-apps/threads.app.ts +7 -0
- package/src/system-apps/tools.app.ts +7 -0
- package/src/system-apps/types.app.ts +7 -0
- package/src/system-apps/variables.app.ts +7 -0
- package/src/system-apps/workflows.app.ts +7 -0
- package/src/tabs-layout/tabs-layout.tsx +672 -0
- package/src/tabs-layout/tabs-state.ts +269 -0
- package/src/three-bar-layout/left-bar-content.tsx +202 -0
- package/src/three-bar-layout/right-bar-content.tsx +67 -0
- package/src/three-bar-layout/three-bar-layout.tsx +297 -0
- package/src/ui-defaults/index.ts +3 -0
- package/src/ui-defaults/list-screen.tsx +92 -0
- package/src/ui-defaults/notes-editor.tsx +51 -0
- package/src/ui-router/routes-loader.ts +98 -0
- package/src/ui-router/ui-loader.tsx +497 -0
- package/src/utils.ts +266 -0
- package/tsconfig.json +24 -0
package/dist/utils.js
ADDED
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AsyncFunction = void 0;
|
|
7
|
+
exports.htmlToText = htmlToText;
|
|
8
|
+
exports.stripMentions = stripMentions;
|
|
9
|
+
exports.trimAndSanitizeHtml = trimAndSanitizeHtml;
|
|
10
|
+
exports.isObject = isObject;
|
|
11
|
+
exports.js = js;
|
|
12
|
+
exports.jsAsync = jsAsync;
|
|
13
|
+
exports.toJSON = toJSON;
|
|
14
|
+
exports.fromJSON = fromJSON;
|
|
15
|
+
const dompurify_1 = __importDefault(require("dompurify"));
|
|
16
|
+
const lodash_1 = __importDefault(require("lodash"));
|
|
17
|
+
function htmlToText(html) {
|
|
18
|
+
let doc = new DOMParser().parseFromString(html, 'text/html');
|
|
19
|
+
return doc.body.textContent || "";
|
|
20
|
+
}
|
|
21
|
+
// Strip mention formatting and clean text for display
|
|
22
|
+
function stripMentions(text) {
|
|
23
|
+
// Replace <type:name:id> with just the readable name part
|
|
24
|
+
// Convert underscores to spaces for better readability
|
|
25
|
+
return text.replace(/<[@$]([^:]+):([^:]+):([^>]+)>/g, (match, type, name, id) => {
|
|
26
|
+
return name.replace(/_/g, ' ');
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function trimAndSanitizeHtml(value) {
|
|
30
|
+
let sanitizedValue = dompurify_1.default.sanitize(value);
|
|
31
|
+
// removes empty paragraphs
|
|
32
|
+
// return sanitizedValue.replace(/\<p\>\<br\>\<\/p\>/ig, '').trim()
|
|
33
|
+
const singleBlankLine = '<p><br></p>';
|
|
34
|
+
const doubleBlankLine = singleBlankLine + singleBlankLine;
|
|
35
|
+
// collapse lots of blank lines into one
|
|
36
|
+
while (sanitizedValue.includes(doubleBlankLine)) {
|
|
37
|
+
// @ts-ignore
|
|
38
|
+
sanitizedValue = sanitizedValue.replaceAll(doubleBlankLine, singleBlankLine);
|
|
39
|
+
}
|
|
40
|
+
// remove trailing blank line
|
|
41
|
+
if (sanitizedValue.endsWith(singleBlankLine)) {
|
|
42
|
+
sanitizedValue = sanitizedValue.substr(0, sanitizedValue.length - singleBlankLine.length);
|
|
43
|
+
}
|
|
44
|
+
return sanitizedValue;
|
|
45
|
+
}
|
|
46
|
+
function isObject(x) {
|
|
47
|
+
return lodash_1.default.isObject(x) && !lodash_1.default.isArray(x) && !lodash_1.default.isDate(x) && x !== null;
|
|
48
|
+
}
|
|
49
|
+
function js(jsCode, externalReferences) {
|
|
50
|
+
const hideGlobals = [
|
|
51
|
+
'process', 'global' //,'setTimeout','setInterval','setImmediate','clearImmediate','clearInterval','clearTimeout'
|
|
52
|
+
];
|
|
53
|
+
const common = module.exports;
|
|
54
|
+
const refNames = ['console', 'common'];
|
|
55
|
+
const refValues = [console, common];
|
|
56
|
+
lodash_1.default.keys(externalReferences).forEach(key => {
|
|
57
|
+
refNames.push(key);
|
|
58
|
+
refValues.push(externalReferences[key]);
|
|
59
|
+
});
|
|
60
|
+
const compiledJs = Function.apply(null, [...refNames, ...hideGlobals, '"use strict"; ' + jsCode.trim()]);
|
|
61
|
+
return compiledJs.apply(null, refValues);
|
|
62
|
+
}
|
|
63
|
+
// must be done this way so TypeScript doesn't rewrite async keyword
|
|
64
|
+
// export const AsyncFunction = eval('Object.getPrototypeOf(async function () { }).constructor');
|
|
65
|
+
exports.AsyncFunction = Object.getPrototypeOf(async function () { }).constructor;
|
|
66
|
+
function jsAsync(jsCode, externalReferences = {}) {
|
|
67
|
+
jsCode = String(jsCode).trim();
|
|
68
|
+
const hideGlobals = [
|
|
69
|
+
'process', 'global' //,'setTimeout','setInterval','setImmediate','clearImmediate','clearInterval','clearTimeout'
|
|
70
|
+
];
|
|
71
|
+
const utils = module.exports;
|
|
72
|
+
const refNames = ['utils', 'utils_1', 'Promise', 'console'];
|
|
73
|
+
const refValues = [utils, utils, Promise, console];
|
|
74
|
+
lodash_1.default.keys(externalReferences).forEach(key => {
|
|
75
|
+
refNames.push(key);
|
|
76
|
+
refValues.push(externalReferences[key]);
|
|
77
|
+
});
|
|
78
|
+
const compiledJs = exports.AsyncFunction.apply(null, [...refNames, ...hideGlobals, '"use strict";\n' + jsCode]);
|
|
79
|
+
return compiledJs.apply(null, refValues);
|
|
80
|
+
}
|
|
81
|
+
function toJSON(obj) {
|
|
82
|
+
//console.log('toJSON');
|
|
83
|
+
const knownObjs = [];
|
|
84
|
+
const objRefs = [];
|
|
85
|
+
const newObjs = [];
|
|
86
|
+
let refCount = 0;
|
|
87
|
+
function recurse(obj) {
|
|
88
|
+
// stringify values
|
|
89
|
+
if (Number.isNaN(obj))
|
|
90
|
+
return "NaN";
|
|
91
|
+
if (obj === undefined)
|
|
92
|
+
return "undefined";
|
|
93
|
+
if (obj === Infinity)
|
|
94
|
+
return "Infinity";
|
|
95
|
+
if (obj instanceof RegExp)
|
|
96
|
+
return ("__REGEXP " + obj.toString());
|
|
97
|
+
// if(isDate(obj))
|
|
98
|
+
// return "__DATE " + obj.toISOString();
|
|
99
|
+
if (lodash_1.default.isDate(obj))
|
|
100
|
+
return obj.toISOString();
|
|
101
|
+
if (lodash_1.default.isFunction(obj))
|
|
102
|
+
return '__FUNCTION ' + obj.toString();
|
|
103
|
+
if (lodash_1.default.isElement(obj)) {
|
|
104
|
+
return "__HTML " + obj.outerHTML;
|
|
105
|
+
}
|
|
106
|
+
if (typeof window !== 'undefined' && window && obj === window) {
|
|
107
|
+
return "__WINDOW";
|
|
108
|
+
}
|
|
109
|
+
if (lodash_1.default.isError(obj)) {
|
|
110
|
+
return "__ERROR " + obj.stack;
|
|
111
|
+
}
|
|
112
|
+
// non-objects can just be returned at this point
|
|
113
|
+
if (!(isObject(obj) || lodash_1.default.isArray(obj))) {
|
|
114
|
+
return obj;
|
|
115
|
+
}
|
|
116
|
+
// if we've found a duplicate reference, deal with it
|
|
117
|
+
var iObj = knownObjs.indexOf(obj);
|
|
118
|
+
if (iObj >= 0) {
|
|
119
|
+
var ref = objRefs[iObj];
|
|
120
|
+
var nObj = newObjs[iObj];
|
|
121
|
+
if (lodash_1.default.isArray(nObj) && (!lodash_1.default.isString(nObj[0]) || !nObj[0].match(/^__this_ref:/)))
|
|
122
|
+
nObj.unshift("__this_ref:" + ref);
|
|
123
|
+
else if (isObject(nObj) && !nObj.__this_ref)
|
|
124
|
+
nObj.__this_ref = ref;
|
|
125
|
+
return ref;
|
|
126
|
+
}
|
|
127
|
+
// capture references in case we need them later
|
|
128
|
+
refCount++;
|
|
129
|
+
var newRef = "__duplicate_ref_" + (lodash_1.default.isArray(obj) ? "ary_" : "obj_") + refCount;
|
|
130
|
+
var nObj = lodash_1.default.isArray(obj) ? [] : {};
|
|
131
|
+
knownObjs.push(obj);
|
|
132
|
+
objRefs.push(newRef);
|
|
133
|
+
newObjs.push(nObj);
|
|
134
|
+
// recurse on properties
|
|
135
|
+
if (lodash_1.default.isArray(obj))
|
|
136
|
+
for (var i = 0; i < obj.length; i++)
|
|
137
|
+
nObj.push(recurse(obj[i])); // use push so offset from reference capture doesn't mess things up
|
|
138
|
+
else
|
|
139
|
+
for (var key in obj) {
|
|
140
|
+
if (!(obj && obj.hasOwnProperty && obj.hasOwnProperty(key)))
|
|
141
|
+
continue;
|
|
142
|
+
var value = recurse(obj[key]);
|
|
143
|
+
if (key[0] == '$') // escape leading dollar signs
|
|
144
|
+
key = '__DOLLAR_' + key.substr(1);
|
|
145
|
+
nObj[key] = value;
|
|
146
|
+
}
|
|
147
|
+
return nObj;
|
|
148
|
+
}
|
|
149
|
+
obj = recurse(obj);
|
|
150
|
+
return obj;
|
|
151
|
+
}
|
|
152
|
+
function fromJSON(obj, externalReferences) {
|
|
153
|
+
//console.log('fromJSON');
|
|
154
|
+
var dup_refs = {};
|
|
155
|
+
function recurse(obj) {
|
|
156
|
+
if (lodash_1.default.isString(obj)) {
|
|
157
|
+
// restore values
|
|
158
|
+
if (obj === "undefined")
|
|
159
|
+
return undefined;
|
|
160
|
+
if (obj === "NaN")
|
|
161
|
+
return NaN;
|
|
162
|
+
if (obj === "Infinity")
|
|
163
|
+
return Infinity;
|
|
164
|
+
if (obj.match(/^__REGEXP /)) {
|
|
165
|
+
var m = obj.split("__REGEXP ")[1].match(/\/(.*)\/(.*)?/);
|
|
166
|
+
return new RegExp(m[1], m[2] || "");
|
|
167
|
+
}
|
|
168
|
+
if (obj.match(/^\d{4}-\d{2}-\d{2}T\d{2}\:\d{2}\:\d{2}\.\d{3}Z$/)) {
|
|
169
|
+
return new Date(obj);
|
|
170
|
+
}
|
|
171
|
+
if (obj.match(/^__FUNCTION /)) {
|
|
172
|
+
return js(obj.substring(11), externalReferences);
|
|
173
|
+
}
|
|
174
|
+
if (obj.match(/^__HTML /)) {
|
|
175
|
+
//@ts-ignore
|
|
176
|
+
if (typeof $ !== 'undefined')
|
|
177
|
+
return $(obj.substring(7))[0];
|
|
178
|
+
else
|
|
179
|
+
return obj;
|
|
180
|
+
}
|
|
181
|
+
if (obj.startsWith("__ERROR ")) {
|
|
182
|
+
let error = new Error();
|
|
183
|
+
error.stack = obj.substring(8);
|
|
184
|
+
return error;
|
|
185
|
+
}
|
|
186
|
+
if (obj === "__WINDOW") {
|
|
187
|
+
return window;
|
|
188
|
+
}
|
|
189
|
+
// deal with duplicate refs
|
|
190
|
+
if (obj.match(/^__duplicate_ref_/)) {
|
|
191
|
+
if (!dup_refs[obj])
|
|
192
|
+
dup_refs[obj] = obj.match(/_obj_/) ? {} : [];
|
|
193
|
+
return dup_refs[obj];
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
if (!(isObject(obj) || lodash_1.default.isArray(obj)))
|
|
197
|
+
return obj;
|
|
198
|
+
// deal with objects that have duplicate refs
|
|
199
|
+
var dup_ref = null;
|
|
200
|
+
obj = lodash_1.default.clone(obj); // don't mess up the original JSON object
|
|
201
|
+
if (lodash_1.default.isArray(obj) && lodash_1.default.isString(obj[0]) && obj[0].match(/^__this_ref:/))
|
|
202
|
+
dup_ref = obj.shift().split(':')[1];
|
|
203
|
+
else if (obj.__this_ref) {
|
|
204
|
+
dup_ref = obj.__this_ref;
|
|
205
|
+
delete obj.__this_ref;
|
|
206
|
+
}
|
|
207
|
+
var mObj = lodash_1.default.isArray(obj) ? [] : {};
|
|
208
|
+
if (dup_ref)
|
|
209
|
+
if (!dup_refs[dup_ref])
|
|
210
|
+
dup_refs[dup_ref] = mObj;
|
|
211
|
+
else
|
|
212
|
+
mObj = dup_refs[dup_ref];
|
|
213
|
+
// restore keys and recurse on objects
|
|
214
|
+
for (var key in obj) {
|
|
215
|
+
if (!obj.hasOwnProperty(key))
|
|
216
|
+
continue;
|
|
217
|
+
var value = recurse(obj[key]);
|
|
218
|
+
if (key.match(/^__DOLLAR_/))
|
|
219
|
+
key = '$' + key.substr(9);
|
|
220
|
+
mObj[key] = value;
|
|
221
|
+
}
|
|
222
|
+
return mObj;
|
|
223
|
+
}
|
|
224
|
+
obj = recurse(obj);
|
|
225
|
+
return obj;
|
|
226
|
+
}
|
|
227
|
+
// export type IObjectMatch<T> = {
|
|
228
|
+
// [key in keyof T]?: RegExp | string | number | boolean
|
|
229
|
+
// }
|
|
230
|
+
// export function objectMatch<T>(value: T, match: IObjectMatch<T>): boolean {
|
|
231
|
+
// for (const [k, _m] of Object.entries(match)) {
|
|
232
|
+
// const m = _m as any;
|
|
233
|
+
// if (m === undefined) continue; // NOTE we are not trying to match undefined values
|
|
234
|
+
// // NOTE null will match null or undefined
|
|
235
|
+
// if (m === null && (value[k] === null || value[k] === undefined)) {
|
|
236
|
+
// return true
|
|
237
|
+
// }
|
|
238
|
+
// if (_.isRegExp(m)) {
|
|
239
|
+
// if (!String(value[k]).match(m)) {
|
|
240
|
+
// return false;
|
|
241
|
+
// }
|
|
242
|
+
// } else if (m != value[k]) {
|
|
243
|
+
// return false;
|
|
244
|
+
// }
|
|
245
|
+
// }
|
|
246
|
+
// return true;
|
|
247
|
+
// }
|
|
248
|
+
// @ts-ignore
|
|
249
|
+
if (typeof window !== 'undefined')
|
|
250
|
+
window.utils = module.exports;
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# Conversation Tab Implementation Plan
|
|
2
|
+
|
|
3
|
+
## Current State Analysis
|
|
4
|
+
|
|
5
|
+
### Existing Thread/Conversation System
|
|
6
|
+
The codebase has a robust thread/conversation system with the following components:
|
|
7
|
+
|
|
8
|
+
#### **Data Model**
|
|
9
|
+
- **IMessage interface** with hierarchical threading via `messageParentId`
|
|
10
|
+
- **Thread Logic**: Parent message + replies with same `messageParentId`
|
|
11
|
+
- **Channel Integration**: Threads exist within channels but are filtered from main channel view
|
|
12
|
+
|
|
13
|
+
#### **State Management**
|
|
14
|
+
```typescript
|
|
15
|
+
// Existing persistent variables in globals.tsx
|
|
16
|
+
openThreads: persistentVar<(string | IMessage)[]> // Array of open thread IDs
|
|
17
|
+
threadViewOpen: persistentVar<boolean> // Controls side panel visibility
|
|
18
|
+
openThread(thread): Function // Opens thread in side panel
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
#### **Existing Components**
|
|
22
|
+
- **ThreadContainer**: Main thread UI with tabbed interface for multiple threads
|
|
23
|
+
- **ThreadMessageList**: Displays messages within specific thread
|
|
24
|
+
- **MessageDisplay**: Individual message rendering with thread context
|
|
25
|
+
- **OpenThreads**: Dropdown for thread switching
|
|
26
|
+
|
|
27
|
+
#### **Current Limitations**
|
|
28
|
+
- ❌ No URL routing for threads (`/threads/[id]`)
|
|
29
|
+
- ❌ No standalone thread detail views (always side panel)
|
|
30
|
+
- ❌ No deep-linking to specific conversations
|
|
31
|
+
- ❌ No integration with tabs system
|
|
32
|
+
|
|
33
|
+
## Implementation Plan: Phase 1 - Conversation Tabs
|
|
34
|
+
|
|
35
|
+
### **Goal**: Integrate existing thread system with tabs architecture
|
|
36
|
+
|
|
37
|
+
### **Step 1: Thread Routing Integration**
|
|
38
|
+
Add thread detail routes to main Router component:
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
// In router.tsx
|
|
42
|
+
if (path.match(/^threads\/([a-zA-Z0-9]{25})/)) {
|
|
43
|
+
const threadId = path.split('/')[1];
|
|
44
|
+
return <ThreadDetailView threadId={threadId} />;
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### **Step 2: Create ThreadDetailView Component**
|
|
49
|
+
New component that renders thread as main content instead of side panel:
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
// src/screens/threads/thread-details.tsx
|
|
53
|
+
export const ThreadDetails = (props: { threadId: string }) => {
|
|
54
|
+
const thread = usePromise(async () => {
|
|
55
|
+
const parentMessage = await Messages().get(props.threadId);
|
|
56
|
+
if (!parentMessage) return null;
|
|
57
|
+
updateActiveTabTitle(`Thread: ${parentMessage.message.slice(0, 30)}...`);
|
|
58
|
+
return parentMessage;
|
|
59
|
+
}, [props.threadId]);
|
|
60
|
+
|
|
61
|
+
// Render thread messages in main content area
|
|
62
|
+
return <ThreadMessageList threadId={props.threadId} />;
|
|
63
|
+
};
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### **Step 3: Thread System App Enhancement**
|
|
67
|
+
Update the threads system app to support individual thread opening:
|
|
68
|
+
|
|
69
|
+
```typescript
|
|
70
|
+
// src/system-apps/threads.app.ts
|
|
71
|
+
export const threadsApp: IAppNav = {
|
|
72
|
+
name: 'Threads',
|
|
73
|
+
iconClassName: 'bi-cpu',
|
|
74
|
+
navigationPath: 'shell', // Main shell for overview
|
|
75
|
+
alwaysNewTab: false // Allow switching to existing thread list
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
// New system app for individual conversations
|
|
79
|
+
export const conversationApp: IAppNav = {
|
|
80
|
+
name: 'Conversation',
|
|
81
|
+
iconClassName: 'bi-chat-dots',
|
|
82
|
+
navigationPath: 'threads/', // Will be dynamic per thread
|
|
83
|
+
alwaysNewTab: true // Each conversation gets its own tab
|
|
84
|
+
};
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### **Step 4: Thread Opening Integration**
|
|
88
|
+
Modify existing `openThread()` function to support both side panel and tab modes:
|
|
89
|
+
|
|
90
|
+
```typescript
|
|
91
|
+
// Enhanced openThread function
|
|
92
|
+
const openThreadInTab = (threadId: string, messagePreview?: string) => {
|
|
93
|
+
const threadPath = `threads/${threadId}`;
|
|
94
|
+
const threadTitle = messagePreview
|
|
95
|
+
? `Thread: ${messagePreview.slice(0, 30)}...`
|
|
96
|
+
: 'Thread';
|
|
97
|
+
|
|
98
|
+
// Open thread in new tab
|
|
99
|
+
onOpenTab({
|
|
100
|
+
packageId: 'system-apps',
|
|
101
|
+
path: threadPath,
|
|
102
|
+
title: threadTitle,
|
|
103
|
+
iconClassName: 'bi-chat-dots',
|
|
104
|
+
closable: true
|
|
105
|
+
}, true); // Always new tab for threads
|
|
106
|
+
};
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### **Step 5: State Migration Strategy**
|
|
110
|
+
**Option A: Merge openThreads into activeTabs**
|
|
111
|
+
- Convert existing `openThreads` entries to tab format
|
|
112
|
+
- Remove separate thread state management
|
|
113
|
+
- Rely on activeTabs for persistence
|
|
114
|
+
|
|
115
|
+
**Option B: Parallel Systems (Recommended Phase 1)**
|
|
116
|
+
- Keep existing `openThreads` for side panel (backwards compatibility)
|
|
117
|
+
- Add new tab-based thread opening
|
|
118
|
+
- Allow users to choose: quick side panel vs dedicated tab
|
|
119
|
+
|
|
120
|
+
### **Step 6: Thread List Enhancement**
|
|
121
|
+
Create a thread list view for the main "Threads" app:
|
|
122
|
+
|
|
123
|
+
```typescript
|
|
124
|
+
// src/screens/threads/thread-list.tsx
|
|
125
|
+
export const ThreadList = () => {
|
|
126
|
+
// Show user's recent threads/conversations
|
|
127
|
+
// Each thread gets "Open in Tab" button
|
|
128
|
+
// Integration with search functionality
|
|
129
|
+
};
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Benefits of Tab-Based Threads
|
|
133
|
+
|
|
134
|
+
### **User Experience**
|
|
135
|
+
- **Multiple Conversations**: Several AI chats open simultaneously
|
|
136
|
+
- **Context Preservation**: Threads survive app reloads
|
|
137
|
+
- **Deep Linking**: Direct URLs to specific conversations
|
|
138
|
+
- **Mobile Friendly**: Tabs work better than sliding panels on mobile
|
|
139
|
+
|
|
140
|
+
### **Technical Benefits**
|
|
141
|
+
- **Consistent Architecture**: Threads follow same patterns as other detail screens
|
|
142
|
+
- **Dynamic Titles**: Smart titles showing conversation context
|
|
143
|
+
- **Search Integration**: Threads appear in app launcher search
|
|
144
|
+
- **Grid Layout Ready**: Perfect foundation for Phase 2 grid system
|
|
145
|
+
|
|
146
|
+
## Implementation Phases
|
|
147
|
+
|
|
148
|
+
### **Phase 1: Basic Thread Tabs** (This Plan)
|
|
149
|
+
- [ ] Add thread routing to Router component
|
|
150
|
+
- [ ] Create ThreadDetails component
|
|
151
|
+
- [ ] Update openThread function for tab support
|
|
152
|
+
- [ ] Add thread list view
|
|
153
|
+
- [ ] Update system apps configuration
|
|
154
|
+
|
|
155
|
+
### **Phase 2: State Unification**
|
|
156
|
+
- [ ] Migrate openThreads data to activeTabs
|
|
157
|
+
- [ ] Remove duplicate thread state management
|
|
158
|
+
- [ ] Enhance thread persistence and sync
|
|
159
|
+
|
|
160
|
+
### **Phase 3: Advanced Features**
|
|
161
|
+
- [ ] Thread search and filtering
|
|
162
|
+
- [ ] Conversation previews in app launcher
|
|
163
|
+
- [ ] Thread grouping and organization
|
|
164
|
+
- [ ] Integration with AI assistant selection
|
|
165
|
+
|
|
166
|
+
### **Phase 4: Grid Layout Integration** (Future)
|
|
167
|
+
- [ ] Split screen: content + conversation
|
|
168
|
+
- [ ] Multiple conversations in grid cells
|
|
169
|
+
- [ ] Flexible conversation positioning
|
|
170
|
+
- [ ] Context-aware conversation suggestions
|
|
171
|
+
|
|
172
|
+
## Technical Considerations
|
|
173
|
+
|
|
174
|
+
### **Thread ID Format**
|
|
175
|
+
- Existing thread IDs are message IDs (25-character strings)
|
|
176
|
+
- URL pattern: `/threads/[messageId]`
|
|
177
|
+
- Compatible with existing message lookup
|
|
178
|
+
|
|
179
|
+
### **Title Generation Strategy**
|
|
180
|
+
```typescript
|
|
181
|
+
const generateThreadTitle = (parentMessage: IMessage): string => {
|
|
182
|
+
// Use first 30 characters of parent message
|
|
183
|
+
const preview = parentMessage.message.slice(0, 30);
|
|
184
|
+
return `Thread: ${preview}${parentMessage.message.length > 30 ? '...' : ''}`;
|
|
185
|
+
};
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### **Integration Points**
|
|
189
|
+
- **Router**: Add thread routing patterns
|
|
190
|
+
- **ThreadMessageList**: Reuse existing component
|
|
191
|
+
- **TabsLayout**: Thread tabs with conversation icons
|
|
192
|
+
- **App Launcher**: Threads searchable and launchable
|
|
193
|
+
|
|
194
|
+
## Migration Path
|
|
195
|
+
|
|
196
|
+
1. **Implement parallel systems** (old side panel + new tabs)
|
|
197
|
+
2. **User choice** during transition period
|
|
198
|
+
3. **Gradual migration** of state and preferences
|
|
199
|
+
4. **Remove legacy** side panel system once tabs proven
|
|
200
|
+
|
|
201
|
+
This approach ensures no disruption to existing users while providing enhanced capabilities for power users who want multiple conversations open simultaneously.
|